46 lines
1016 B
YAML
46 lines
1016 B
YAML
---
|
|
|
|
- name: Ticket Template
|
|
ansible.builtin.include_tasks:
|
|
file: api/ticket_template.yaml
|
|
when: item.api_path == 'TicketTemplate'
|
|
|
|
|
|
- name: Append/Create Item
|
|
ansible.builtin.include_tasks:
|
|
file: api/append-create-item.yaml
|
|
when: >
|
|
not item.api_path == 'Config'
|
|
and
|
|
not item.api_path == 'TicketTemplate'
|
|
|
|
|
|
- name: Config Items to skip
|
|
ansible.builtin.import_tasks:
|
|
file: api/excluded_config.yaml
|
|
|
|
|
|
- name: Add/Update GLPI Config
|
|
ansible.builtin.include_tasks:
|
|
file: api/config.yaml
|
|
when: >
|
|
not sub_item.name in skip_config
|
|
and
|
|
sub_item.value is defined
|
|
loop: "{% if item.api_path == 'Config' %}{{ item.body }}{% else %}{{ [] }}{% endif %}"
|
|
loop_control:
|
|
loop_var: sub_item
|
|
vars:
|
|
list_item:
|
|
api_path: "{{ item.api_path }}"
|
|
body:
|
|
context: "{{ sub_item.context }}"
|
|
name: "{{ sub_item.name }}"
|
|
value: "{{ sub_item.value }}"
|
|
|
|
|
|
- name: Clear temp vars
|
|
ansible.builtin.set_fact:
|
|
item_body: {}
|
|
no_log: true
|