Running Ansible against localhost
Run commands against the Ansible control node by using “localhost” or “127.0.0.1” for the server name:
$ ansible localhost -m ping -e 'ansible_python_interpreter="/usr/bin/env python"'
localhost ansible_connection=local ansible_python_interpreter="/usr/bin/env python"
$ ansible localhost -m ping -e 'ansible_python_interpreter="/usr/bin/env python"'
Or specify localhost explicitly by adding this to your inventory file:
localhost ansible_connection=local ansible_python_interpreter="/usr/bin/env python"
Comments
Post a Comment