diff --git a/hosts b/hosts index a52f275..fb4ca40 100644 --- a/hosts +++ b/hosts @@ -1,2 +1,2 @@ [server] -pdc ansible_ssh_host=10.0.0.1 ansible_ssh_user=amgmt +10.0.0.1 ansible_ssh_user=amgmt diff --git a/roles/setup/tasks/centos_pkgs.yml b/roles/setup/tasks/centos_pkgs.yml index ee25d1f..37b1e1d 100644 --- a/roles/setup/tasks/centos_pkgs.yml +++ b/roles/setup/tasks/centos_pkgs.yml @@ -1,18 +1,18 @@ --- - name: Verifica installazione pacchetti aggiuntivi - shell: rpm -q {{ item }} + yum: name={{ item }} state=present sudo: yes - with_items: addins_pkg + with_items: addins_pkgs register: check_pkg - changed_when: check_pkg.rc != 0 + ignore_errors: yes tags: pkg - name: Verifica configurazione CentOS 6 - file: name=/etc/yum.repos.d/{{ item }} state=file + shell: test -f /etc/yum.repos.d/{{ item }} sudo: yes with_items: centos_repo_files - when: check_pkg|changed + when: check_pkg|failed register: check_repos tags: repo @@ -51,8 +51,8 @@ sudo: yes register: first_repo_activate when: centos_repo_installed|changed - async: 600 - poll: 10 + async: 1800 + poll: 60 tags: repo - name: Attivo EPEL diff --git a/roles/setup/tasks/clearos_pkgs.yml b/roles/setup/tasks/clearos_pkgs.yml index 9dc01fd..ca208bc 100644 --- a/roles/setup/tasks/clearos_pkgs.yml +++ b/roles/setup/tasks/clearos_pkgs.yml @@ -1,8 +1,8 @@ --- - name: Aggiunta pacchetti specifici ClearOS - yum: name={{ item }} state=present + yum: name="{{ item }}" state=present + async: 1800 + poll: 60 sudo: yes with_items: clearos_pkgs - async: 3600 - poll: 30