Pulizia nei tasks di setup. Aggiunta async per task lunghi.

This commit is contained in:
Emiliano Vavassori 2015-04-16 18:23:01 +02:00
parent 25e3afff28
commit 7958728837
7 changed files with 81 additions and 66 deletions

View File

@ -1,9 +1,12 @@
---
- name: Verifica installazione git
yum: name=git-svn state=present
- name: Download della gestione client con ansible
git: repo=http://github.com/syntaxerrormmm/ps-clientmgmt.git
dest=/root/clientmgmt
remote_user: amgmt
sudo_user: root
sudo: yes
tags:
- git

View File

@ -1,15 +0,0 @@
---
- 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

@ -1,9 +1,18 @@
---
- name: Verifica configurazione CentOS 6
file: name=/etc/yum.repos.d/CentOS-Base.repo state=file
- name: Verifica installazione pacchetti aggiuntivi
shell: rpm -q {{ item }}
sudo: yes
ignore_errors: yes
with_items: addins_pkg
register: check_pkg
changed_when: check_pkg.rc != 0
tags: pkg
- name: Verifica configurazione CentOS 6
file: name=/etc/yum.repos.d/{{ item }} state=file
sudo: yes
with_items: centos_repo_files
when: check_pkg|changed
register: check_repos
tags: repo
@ -40,12 +49,16 @@
- name: Prima attivazione repo
shell: yum clean all && yum repolist
sudo: yes
register: first_repo_activate
when: centos_repo_installed|changed
async: 600
poll: 10
tags: repo
- name: Attivo EPEL
yum: name=epel-release state=present
sudo: yes
when: first_repo_activate|changed
register: epel_installed
tags: repo
@ -53,6 +66,8 @@
shell: yum clean all && yum repolist
sudo: yes
when: epel_installed|changed
async: 600
poll: 10
tags: repo
- name: Pulizia
@ -60,3 +75,12 @@
sudo: yes
when: check_repos|failed
tags: repo
- name: Installo pacchetti di gestione
yum: name={{ item }} state=present
sudo: yes
when: ansible_os_family == 'ClearOS'
with_items: addin_pkgs
async: 3600
poll: 30
tags: pkg

View File

@ -3,34 +3,6 @@
- name: Aggiunta pacchetti specifici ClearOS
yum: name={{ item }} state=present
sudo: yes
with_items:
- app-content-filter
- app-web-proxy
- app-proxy-report
- app-openldap-directory
- app-ntp
- app-configuration-backup
- app-firewall
- app-network
- app-users
- app-groups
- app-administrators
- app-password-policies
- app-accounts
- app-account-import
- app-services
- app-software-repository
- app-software-updates
- app-ssh-server
- app-dhcp
- app-flexshare
- app-process-viewer
- app-log-viewer
- app-print-server
- app-samba
- app-user-profile
- app-date
- app-marketplace
- app-registration
- app-dashboard
- app-base
with_items: clearos_pkgs
async: 3600
poll: 30

View File

@ -1,7 +1,12 @@
---
- include: clearos_pkgs.yml
- include: centos_addrepos.yml
- include: packages.yml
- include: centos_delrepos.yml
tags: clearos
- include: centos_pkgs.yml
tags: centos
- include: ansible.yml
tags:
- git
- ansible

View File

@ -1,13 +0,0 @@
---
- name: Installo pacchetti di gestione
yum: name={{ item }} state=present
sudo: yes
when: ansible_os_family == 'ClearOS'
with_items:
- git-svn
- vim-enhanced
- screen
- sshpass
- ansible
tags: pkg

View File

@ -10,3 +10,42 @@ centos_gpg_files:
- RPM-GPG-KEY-CentOS-Security-6
- RPM-GPG-KEY-CentOS-Debug-6
- RPM-GPG-KEY-CentOS-Testing-6
addin_pkgs:
- git-svn
- vim-enhanced
- screen
- sshpass
- ansible
clearos_pkgs:
- app-content-filter
- app-web-proxy
- app-proxy-report
- app-openldap-directory
- app-ntp
- app-configuration-backup
- app-firewall
- app-network
- app-users
- app-groups
- app-administrators
- app-password-policies
- app-accounts
- app-account-import
- app-services
- app-software-repository
- app-software-updates
- app-ssh-server
- app-dhcp
- app-flexshare
- app-process-viewer
- app-log-viewer
- app-print-server
- app-samba
- app-user-profile
- app-date
- app-marketplace
- app-registration
- app-dashboard
- app-base