Newbie Question - Ansible Engine required

5 views
Skip to first unread message

Warron French

unread,
Aug 3, 2021, 1:15:25 PMAug 3
to Ansible Development
I have not yet written any ansible plays, playbooks - code in general.

If I write some ansible code, do I necessarily require an Ansible Engine, or Ansible Tower, or can I simply copy the playbooks (those are the files full of code right) and then execute them with:

      ansible-playbook    myplaybook.yml

with the understanding that a host specified within the file "myplaybook.yml" is identified within the /etc/ansible/hosts file?  Correct?

So, I would want to use--
hosts:   localhost within the file myplaybook.yml 
and ensure localhost was identified in /etc/ansbile/hosts on any machine that I needed to run the plays/modules on?

Thank you,
Reply all
Reply to author
Forward
0 new messages