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:
- 
- include: upstart_common_init.yml
 
 - 
vars:
 - 
program_name: “{{ item.service_name }}”
 - 
program_config_options: “–config-file /etc/xyz/{{ item.service_conf }}”
 - 
system_user: “{{ system_user_name }}”
 - 
system_group: “{{ system_group_name }}”
 - 
service_home: “{{ system_home_folder }}”
 - 
with_items: some_services
 - 
when: >
 - 
inventory_hostname in groups[item.service_group] and
 - 
item.service_en == true
 - 
tags:
 - 
- 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:
- 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