amazon linux 2023 update

This commit is contained in:
havelight-ee
2023-06-15 17:05:57 +09:00
parent a794f85f96
commit 3e6e76f0b8
7 changed files with 58 additions and 59 deletions

40
tasks/dsk-redhat-pkg.yml Normal file
View File

@@ -0,0 +1,40 @@
---
- name: "Setting global-config"
template:
src: global-config.yml.j2
dest: "/etc/datasaker/global-config.yml"
- name: "Add datasaker repository"
yum_repository:
name: datasaker
description: datasaker-repo
baseurl: "{{ datasaker_yum_repo }}"
enabled: "{{ datasaker_yum_enabled }}"
gpgcheck: "{{ datasaker_yum_gpgcheck }}"
- set_fact:
datasaker_agents: "{{ datasaker_agents | reject('equalto', 'dsk-log-agent') | list }}"
- name: "Check datasaker Agent"
include_tasks: check-agent.yml
- name: Make Datasaker Log Directory
ansible.builtin.file:
path: "/var/log/datasaker/{{ item }}"
state: directory
recurse: yes
owner: root
group: root
with_items:
- "{{ datasaker_agents }}"
- name: "Install datasaker agent"
yum:
name: "{{ item }}"
state: present
update_cache: yes
with_items:
- "{{ datasaker_agents }}"
notify:
- Reload systemd configuration
- Restart {{ item }} service

View File

@@ -1,12 +0,0 @@
---
- 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
- name: Include Datasaker Add Repository
include_tasks: dsk-common.yml
when: ansible_facts.os_family == "Debian"
- name: Include Datasaker Host Agent Install
include_tasks: dsk-debian-pkg.yml
when: ansible_facts.os_family == "Debian"

View File

@@ -5,12 +5,16 @@
- name: Include Datasaker Add Repository
include_tasks: dsk-common.yml
when: uninstall == False and ansible_facts.os_family == "Debian"
when: uninstall == False and ansible_facts.os_family == "Debian" or ansible_facts.os_family == "RedHat"
- name: Include Datasaker 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"
- name: Include Datasaker RedHat Host Agent Install
include_tasks: dsk-redhat-pkg.yml
when: uninstall == False and ansible_facts.os_family == "RedHat"
- name: Uninstall Datasaker Agent
include_tasks: remove-datasaker.yml
when: uninstall == True
when: uninstall == True