Ansible Script 추가
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
---
|
||||
- name: Install pinned datadog-agent package (dnf)
|
||||
dnf:
|
||||
name: "{{ datadog_agent_flavor }}-{{ datadog_agent_redhat_version }}"
|
||||
update_cache: yes
|
||||
state: present
|
||||
allow_downgrade: "{{ datadog_agent_allow_downgrade }}"
|
||||
register: datadog_agent_install
|
||||
when: not ansible_check_mode and ansible_pkg_mgr == "dnf"
|
||||
notify: restart datadog-agent
|
||||
|
||||
- name: Install pinned datadog-agent package (yum)
|
||||
yum:
|
||||
# We have to add architecture, because yum only understands epoch when architecture is also specified
|
||||
name: "{{ datadog_agent_flavor }}-{{ datadog_agent_redhat_version }}.{{ ansible_facts.architecture }}"
|
||||
update_cache: yes
|
||||
state: present
|
||||
allow_downgrade: "{{ datadog_agent_allow_downgrade }}"
|
||||
register: datadog_agent_install
|
||||
when: not ansible_check_mode and ansible_pkg_mgr == "yum"
|
||||
notify: restart datadog-agent
|
||||
Reference in New Issue
Block a user