limit/subset as variable

17 views
Skip to first unread message

DomaNitro

unread,
Dec 17, 2014, 5:53:52 PM12/17/14
to ansible...@googlegroups.com
Hi,

I have play that includes another play

apps.yml
- name: apps.yml | provision
  hosts
: apps
  include
: provision.yml


- name: apps.yml | common stuff
  hosts
: apps
  roles
:
   
- do_common_stuff
 
provision.yml
- hosts: "{{subset_var}}"
  connection
: local
  gather_facts
: no
  pre_tasks
:
     
- name: do some stuff
       dosome_tasks
  roles
:
   - { role: do_some_provisioning }
   - { role: do_more_stuff}
   - { role: maybe_also_dns}
   

The concept is that provision will be called from different plays for different groups and the provision play will take the subset of the parent play. 

If you have a solution that does not involve passing "-e" it would be great to share


DomaNitro

unread,
Dec 17, 2014, 5:57:33 PM12/17/14
to ansible...@googlegroups.com
Sorry i just realized there is a simlear question https://groups.google.com/forum/#!topic/ansible-project/c8bdwPtR640
Reply all
Reply to author
Forward
0 new messages