This commit is contained in:
havelight-ee
2023-06-16 17:34:32 +09:00
parent cd2f40c08d
commit a4a3c489da
10 changed files with 281 additions and 16 deletions

View File

@@ -1,20 +1,46 @@
---
- name: Include Gather Ansible Facts task on Ansible >= 2.10
- name: "Include Gather Ansible Facts task on Ansible >= 2.10"
include_tasks: gather-facts.yml
when: ansible_version.major >= 2 and ansible_version.minor >= 10
when:
- ansible_version.major >= 2
- ansible_version.minor >= 10
- name: Include Datasaker Add Repository
- name: "Check Datasaker Agent List"
set_fact:
datasaker_agents: []
when: datasaker_docker_agents | select('search', 'docker') | list | count > 0
- name: "Include Datasaker Add Directory Config"
include_tasks: dsk-common.yml
when: uninstall == False and ansible_facts.os_family == "Debian" or ansible_facts.os_family == "RedHat"
when:
- uninstall == False
- name: Include Datasaker Debian Host Agent Install
- name: "Include Datasaker Debian Host Agent Install"
include_tasks: dsk-debian-pkg.yml
when: uninstall == False and ansible_facts.os_family == "Debian"
when:
- uninstall == False
- ansible_facts.os_family == "Debian"
- datasaker_agents
- name: Include Datasaker RedHat Host Agent Install
- name: "Include Datasaker RedHat Host Agent Install"
include_tasks: dsk-redhat-pkg.yml
when: uninstall == False and ansible_facts.os_family == "RedHat"
when:
- uninstall == False
- ansible_facts.os_family == "RedHat"
- datasaker_agents
- name: Uninstall Datasaker Agent
- name: "Include Datasaker Agent Install"
include_tasks: check-agent.yml
when:
- uninstall == False
- name: "Include Docker Agent Path Permissions Setting"
include_tasks: permissions.yml
when:
- uninstall == False
- datasaker_docker_agents
- name: "Uninstall Datasaker Agent"
include_tasks: remove-datasaker.yml
when: uninstall == True
when:
- uninstall == True