Nuova prova di installazione pacchetti da ClearOS.

This commit is contained in:
Emiliano Vavassori 2015-04-16 12:50:07 +02:00
parent 0836b4512e
commit eb32520c61
14 changed files with 41 additions and 11 deletions

View File

@ -4,4 +4,4 @@
vars:
- ansible_ssh_user: root
roles:
- firstsetup
- init

View File

@ -1,6 +0,0 @@
---
- include: add_centos_repos.yml
- include: packages.yml
- include: clearos_pkg.yml
- include: ansible.yml

View File

@ -22,14 +22,16 @@
tags: repo
- name: Copio i repository
shell: cp -f /tmp/centos-release/etc/yum.repos.d/* /etc/yum.repos.d/
shell: cp -f /tmp/centos-release/etc/yum.repos.d/{{ item }} /etc/yum.repos.d/
with_items: centos_repo_files
sudo: yes
when: check_repos|failed
register: centos_repo_installed
tags: repo
- name: Copio le chiavi di firma GPG
shell: cp -f /tmp/centos-release/etc/pki/rpm-gpg/* /etc/pki/rpm-gpg/
shell: cp -f /tmp/centos-release/etc/pki/rpm-gpg/{{ item }} /etc/pki/rpm-gpg/
with_items: centos_gpg_files
sudo: yes
when: check_repos|failed
tags: repo

View File

@ -0,0 +1,15 @@
---
- name: Rimozione repository centrali CentOS 6
shell: rm -f /etc/yum.repos.d/{{ item }}
with_items: centos_repo_files
sudo: yes
- name: Rimozione firme GPG repository CentOS 6
shell: rm -f /etc/pki/rpm-gpg/{{ item }}
with_items: centos_gpg_files
sudo: yes
- name: Ripristino repository ad originali
shell: yum clean all && yum repolist
sudo: yes

View File

@ -6,7 +6,7 @@
with_items:
- app-content-filter
- app-web-proxy
- app-filter-proxy-report
- app-proxy-report
- app-openldap-directory
- app-ntp
- app-configuration-backup

View File

@ -0,0 +1,7 @@
---
- include: clearos_pkgs.yml
- include: centos_addrepos.yml
- include: packages.yml
- include: centos_delrepos.yml
- include: ansible.yml

12
roles/setup/vars/main.yml Normal file
View File

@ -0,0 +1,12 @@
centos_repo_files:
- CentOS-Base.repo
- CentOS-Debuginfo.repo
- CentOS-fasttrack.repo
- CentOS-Media.repo
- CentOS-Vault.repo
centos_gpg_files:
- RPM-GPG-KEY-CentOS-6
- RPM-GPG-KEY-CentOS-Security-6
- RPM-GPG-KEY-CentOS-Debug-6
- RPM-GPG-KEY-CentOS-Testing-6

View File

@ -2,4 +2,4 @@
- hosts: server
roles:
- base
- setup