oopen-server/roles/common/tasks/yum.yml
2023-04-06 11:53:54 +02:00

54 lines
1.2 KiB
YAML

---
- name: (yum.yml) Install system updates for centos systems
yum:
name: '*'
state: latest
update_cache: yes
#cache_valid_time: 3600
when:
- ansible_os_family == "RedHat"
- ansible_distribution == "CentOS"
tags:
- yum-update
- name: Install the EPEL Repository in CentOS 7
yum:
name: epel-release
state: latest
# Its more eficient to in
- name: (yum.yml) Base install CentOS packages (CentOS 7)
yum:
name: "{{ yum_base_install_centos_7 }}"
state: "{{ yum_install_state }}"
when:
- ansible_os_family == "RedHat"
- ansible_distribution == "CentOS"
- ansible_distribution_major_version == "7"
tags:
- yum-base-install
- name: (yum.yml) Initial install CentOS packages (CentOS 7)
yum:
name: "{{ yum_initial_install_centos_7 }}"
state: "{{ yum_install_state }}"
when:
- ansible_os_family == "RedHat"
- ansible_distribution == "CentOS"
- ansible_distribution_major_version == "7"
tags:
- yum-initial-install
- name: (yum.yml) Install lxc_host related packages
yum:
name: "{{ yum_lxc_host_pkgs }}"
state: "{{ yum_install_state }}"
when:
- groups['lxc_host']|string is search(inventory_hostname)
tags:
- yum-lxc-hosts-pkgs