18
tasks/api/api.yaml
Normal file
18
tasks/api/api.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
- name: Always End Session
|
||||
block:
|
||||
|
||||
|
||||
- name: Start Session
|
||||
ansible.builtin.include_tasks:
|
||||
file: api/session-create.yaml
|
||||
when: glpi.api.session | default('') == ''
|
||||
|
||||
|
||||
always:
|
||||
|
||||
|
||||
- name: End Session
|
||||
ansible.builtin.include_tasks:
|
||||
file: api/session-end.yaml
|
||||
when: glpi_session_get.status | default(0) | int == 200
|
@ -13,7 +13,6 @@
|
||||
not glpi_installed | bool
|
||||
|
||||
|
||||
|
||||
- name: Configure Log Rotate
|
||||
ansible.builtin.include_tasks:
|
||||
file: configure.yaml
|
||||
@ -31,3 +30,11 @@
|
||||
# and
|
||||
# logrotate | default([]) | length | int > 0
|
||||
# )
|
||||
|
||||
- name: API tasks
|
||||
ansible.builtin.include_tasks:
|
||||
file: api/api.yaml
|
||||
apply:
|
||||
tags:
|
||||
- always
|
||||
when: glpi_config_as_code_json length | int > 0
|
||||
|
Reference in New Issue
Block a user