Possible version: 2.1.0
My file name:
[PM]
asma.example.com ansible_connection=ssh
[ND]
malliswar.example.com ansible_connection=ssh
[CM]
asma.example.com ansible_connection=ssh
malliswar.example.com ansible_connection=ssh
And playbook:
- hosts: PM:ND:CM
remote_user: root
tasks:
{some thing}
- hosts: PM
remote_user: root
tasks:
{some thing}
- hosts: ND
remote_user: root
tasks:
{some thing}
- hosts: CM
remote_user: root
tasks:
{some thing}
And I run the playbook with the following command:
ansible-playbook --limit 'PM' akana-installation.yml
But still the playbook plays all hosts, that means
Play 'PM:ND:CM'
Play 'PM'
Play 'ND'
Play 'CM'
all games are playing. Please help me solve this problem.
What I need: During the execution of the playbook, I will give the name of the group that only the group should play , so please let me know if there is another way.
source
share