feat(api): Create and end a session

!1
This commit is contained in:
2023-07-28 15:15:33 +09:30
parent 15573f03cd
commit febce3aa5e
3 changed files with 30 additions and 1 deletions

18
tasks/api/api.yaml Normal file
View 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