add base packages install

This commit is contained in:
Robert Kaussow 2018-11-29 22:02:25 +01:00
parent 7cec510924
commit 4d4fe3e5d3
3 changed files with 24 additions and 2 deletions

View File

@ -13,3 +13,7 @@ yum_cron_emit_via: stdio
# baseurl: "http://download.fedoraproject.org/pub/epel/$releasever/$basearch/" # baseurl: "http://download.fedoraproject.org/pub/epel/$releasever/$basearch/"
# gpgkey: "http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-$releasever/" # gpgkey: "http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-$releasever/"
# enabled: True # enabled: True
yum_packages_install: []
yum_packages_uninstall: []
yum_packages_extra_install: []

View File

@ -1,3 +1,4 @@
--- ---
- import_tasks: yum_cron.yml - include_tasks: yum_cron.yml
- import_tasks: repository.yml - include_tasks: repository.yml
- include_tasks: packages.yml

17
tasks/packages.yml Normal file
View File

@ -0,0 +1,17 @@
---
- block:
- name: Remove common packages
package:
name: "{{ item }}"
state: absent
with_items:
- "{{ yum_packages_uninstall | default([]) }}"
- name: Install common packages
package:
name: "{{ item }}"
state: present
with_items:
- "{{ yum_packages_install | default([]) }} + {{ yum_packages_extra_install | default([]) }}"
become: True
become_user: root