Update yum to install all packages at once

parent 7c3f4d75
Pipeline #6927 passed with stage
in 2 minutes and 47 seconds
- name: Load {{ ansible_distribution }} {{ ansible_distribution_major_version }} variables
include_vars: "{{ file | basename }}" # This include_vars module is kind of dumb, so we need to test the full path but only include basename
with_first_found:
- files:
- "{{ role_path }}/vars/{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version }}.yml"
- "{{ role_path }}/vars/{{ ansible_distribution | lower }}.yml"
- "{{ role_path }}/vars/{{ ansible_os_family | lower }}.yml"
- "{{ role_path }}/vars/default.yml"
skip: true
- files:
- "{{ role_path }}/vars/{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version }}.yml"
- "{{ role_path }}/vars/{{ ansible_distribution | lower }}.yml"
- "{{ role_path }}/vars/{{ ansible_os_family | lower }}.yml"
- "{{ role_path }}/vars/default.yml"
skip: true
loop_control:
loop_var: file
- name: Load {{ ansible_distribution }} {{ ansible_distribution_major_version }} dependencies
include_tasks: "{{ file }}"
with_first_found:
- files:
- "tasks/{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version }}-dependencies.yml"
- "tasks/{{ ansible_distribution | lower }}-dependencies.yml"
- "tasks/{{ ansible_os_family | lower }}-dependencies.yml"
- "tasks/default-dependencies.yml"
skip: true
- files:
- "tasks/{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version }}-dependencies.yml"
- "tasks/{{ ansible_distribution | lower }}-dependencies.yml"
- "tasks/{{ ansible_os_family | lower }}-dependencies.yml"
- "tasks/default-dependencies.yml"
skip: true
loop_control:
loop_var: file
......@@ -28,13 +28,10 @@
- name: Install triumf nagios package dependencies
yum:
name: "{{ package }}"
name:
- triumf-epel-release
- triumf-server
state: latest
with_items:
- triumf-epel-release
- triumf-server
loop_control:
loop_var: package
become: yes
- name: Install triumf-nagios-client pkg
......@@ -72,4 +69,3 @@
state: started
when: ansible_virtualization_type != "docker" and nrpe_autostart
become: yes
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment