add base packages install
This commit is contained in:
parent
7cec510924
commit
4d4fe3e5d3
@ -13,3 +13,7 @@ yum_cron_emit_via: stdio
|
||||
# baseurl: "http://download.fedoraproject.org/pub/epel/$releasever/$basearch/"
|
||||
# gpgkey: "http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-$releasever/"
|
||||
# enabled: True
|
||||
|
||||
yum_packages_install: []
|
||||
yum_packages_uninstall: []
|
||||
yum_packages_extra_install: []
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
- import_tasks: yum_cron.yml
|
||||
- import_tasks: repository.yml
|
||||
- include_tasks: yum_cron.yml
|
||||
- include_tasks: repository.yml
|
||||
- include_tasks: packages.yml
|
||||
|
17
tasks/packages.yml
Normal file
17
tasks/packages.yml
Normal 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
|
Loading…
Reference in New Issue
Block a user