volanja / ansible-sample-tdd

Test Driven Development for Ansible by ServerSpec. It's Sample
94 stars 14 forks source link

[QUESTION] Support for multiple groups #6

Open ghost opened 8 years ago

ghost commented 8 years ago

I have host file like this:

 [group1]
 x.x.x.x
 x.x.x.x

 [group2]
 x.x.x.x
 x.x.x.x

 [group2]
 x.x.x.x
 x.x.x.x

 [group3]
 x.x.x.x
 x.x.x.x

 [group4]
 x.x.x.x
 x.x.x.x

And now you only can run tests with all nodes or only with a group with hosts: parameter in playbook.

- name: Ansible-Sample-TDD
  hosts: [server/all]
  user: root
  vars:
    worker_connections: 8192
  roles:
    - nginx
    - mariadb

Is possible run a test in more than one but not in all groups?