Reputation: 85
Is there a possibility to add the server, where Ansible is running to the hostfile and maintain it also through Ansible playbooks?
Thanks in advance.
Upvotes: 1
Views: 185
Reputation: 44685
The implicit localhost
using the local
connection plugin is available by default. Meanwhile it does not match the all
group (nor any other actually).
So you can either:
hosts: host_a:group_b:localhost
all
group if you use it, e.g. (ini format) localhost ansible_connection=local
Note that the second option can work with any symbolic name you decide to use e.g. my.host.local ansible_connection=local
Upvotes: 1