add gpgcheck rhnplugin.conf, consolidate task
This commit is contained in:
1 parent
66e258da7e
commit
c9252b167f
1 file changed
+9
-6
@@ -1,10 +1,4 @@
|
||||
---
|
||||
- name: activate gpg-check for yum-repos in yum.conf
|
||||
shell: "sed -i 's/gpgcheck=0/gpgcheck=1/g' /etc/yum.conf"
|
||||
|
||||
- name: activate gpg-check for yum-repos in yum-repositories
|
||||
shell: "sed -i 's/gpgcheck=0/gpgcheck=1/g' /etc/yum.repos.d/*.repo"
|
||||
|
||||
- name: remove unused repositories
|
||||
file: name='/etc/yum.repos.d/{{item}}.repo' state=absent
|
||||
with_items:
|
||||
@@ -13,6 +7,15 @@
|
||||
- 'CentOS-Vault'
|
||||
when: os_security_packages_clean
|
||||
|
||||
- name: activate gpg-check for yum-repos
|
||||
shell: "sed -i 's/gpgcheck=0/gpgcheck=1/g' {{item}}"
|
||||
with_items:
|
||||
- '/etc/yum.conf'
|
||||
- '/etc/yum.repos.d/*.repo'
|
||||
|
||||
- name: activate gpg-check for yum rhn if it exists
|
||||
shell: sed -i 's/gpgcheck=0/gpgcheck=1/g' /etc/yum/pluginconf.d/rhnplugin.conf removes='/etc/yum/pluginconf.d/rhnplugin.conf'
|
||||
|
||||
- name: remove packages
|
||||
yum: name='{{item}}' state=removed
|
||||
with_items:
|
||||
|
||||
Reference in new issue
Block a user