Hi everyone,

I need to include a playbook which is essentially contains a set of 
inititalization tasks for any set of variables passed to it. Like so:


   1. - include: upstart_common_init.yml
   2.   vars:
   3.     program_name: "{{ item.service_name }}"
   4.     program_config_options: "--config-file /etc/xyz/{{
    item.service_conf }}"
   5.     system_user: "{{ system_user_name }}"
   6.     system_group: "{{ system_group_name }}"
   7.     service_home: "{{ system_home_folder }}"
   8.   with_items: some_services
   9.   when: >
   10.     inventory_hostname in groups[item.service_group] and
   11.     item.service_en == true
   12.   tags:
   13.     - upstart-init
   
Where the some_services is a dictionary of services:

some_services:

 - { service_name: abc, service_en: True, service_conf: abc.ini, 
service_group: abc_group }

 - { service_name: def,  service_en: True, service_conf: def.ini, 
service_group: def_group }

I know *with_items* isn't supported with *include* so i get:


   1. ERROR: [DEPRECATED]: include + with_items is a removed deprecated 
   feature, Please update your playbooks.
   

 What would be a reasonable way to implement the above block of code?

Thanks,
J

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9e1ee2a6-cd05-4957-9ed6-12980e7d350e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to