From 173affc2bda3b716c6f367db3fae6a1be7328265 Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Fri, 17 Apr 2015 13:26:45 +0200 Subject: [PATCH] Correzione task di installazione in maniera non sincrona. --- .gitignore | 1 + README.md | 11 +++++++++ roles/setup/tasks/centos_pkgs.yml | 6 ----- roles/setup/tasks/clearos_pkgs.yml | 4 +-- roles/setup/tasks/main.yml | 4 +++ roles/setup/vars/main.yml | 39 ++++++++++-------------------- 6 files changed, 30 insertions(+), 35 deletions(-) diff --git a/.gitignore b/.gitignore index 1377554..fd773a4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.swp +*.box diff --git a/README.md b/README.md index 8755279..3080675 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,14 @@ Per configurarlo: $ ansible-playbook init.yml -u root --ask-pass \ -e "admin_sshkey=/path/to/id_rsa.pub" $ ansible-playbook setup.yml + +# Gestione con vagrant # + +Nel repo è stata caricata una macchina virtuale già pronta con Virtualbox per +l'uso con [`vagrant`](https://www.vagrantup.com/). + +È pertanto possibile creare una macchina virtuale automatica eseguendo i +seguenti comandi: + + $ vagrant box add clearos6 ./clearos6-1.0.0.box + $ vagrant init clearos6 diff --git a/roles/setup/tasks/centos_pkgs.yml b/roles/setup/tasks/centos_pkgs.yml index 35cde25..6eb9f74 100644 --- a/roles/setup/tasks/centos_pkgs.yml +++ b/roles/setup/tasks/centos_pkgs.yml @@ -52,8 +52,6 @@ sudo: yes register: first_repo_activate when: centos_repo_installed|changed - async: 1800 - poll: 60 tags: repo - name: Attivo EPEL @@ -67,8 +65,6 @@ shell: yum clean all && yum repolist sudo: yes when: epel_installed|changed - async: 600 - poll: 10 tags: repo - name: Pulizia @@ -82,6 +78,4 @@ sudo: yes when: ansible_os_family == 'ClearOS' with_items: addin_pkgs - async: 3600 - poll: 30 tags: pkg diff --git a/roles/setup/tasks/clearos_pkgs.yml b/roles/setup/tasks/clearos_pkgs.yml index ca208bc..392f11f 100644 --- a/roles/setup/tasks/clearos_pkgs.yml +++ b/roles/setup/tasks/clearos_pkgs.yml @@ -1,8 +1,6 @@ --- - - name: Aggiunta pacchetti specifici ClearOS yum: name="{{ item }}" state=present - async: 1800 - poll: 60 sudo: yes with_items: clearos_pkgs + register: cleanos_install diff --git a/roles/setup/tasks/main.yml b/roles/setup/tasks/main.yml index bbdd610..0380459 100644 --- a/roles/setup/tasks/main.yml +++ b/roles/setup/tasks/main.yml @@ -1,9 +1,13 @@ --- - include: clearos_pkgs.yml + async: 180 + poll: 30 tags: clearos - include: centos_pkgs.yml + async: 180 + poll: 30 tags: centos - include: ansible.yml diff --git a/roles/setup/vars/main.yml b/roles/setup/vars/main.yml index 1daa268..fdc4807 100644 --- a/roles/setup/vars/main.yml +++ b/roles/setup/vars/main.yml @@ -1,3 +1,4 @@ +--- centos_repo_files: - CentOS-Base.repo - CentOS-Debuginfo.repo @@ -12,40 +13,26 @@ centos_gpg_files: - RPM-GPG-KEY-CentOS-Testing-6 addin_pkgs: - - git-svn + - git - 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-process-viewer + - app-account-import + - app-ntp + - app-administrators + - app-password-policies + - app-user-profile + - app-openldap-directory - app-print-server - app-samba - - app-user-profile - - app-date - - app-marketplace - - app-registration - - app-dashboard - - app-base + - app-flexshare + - app-web-proxy + - app-proxy-report + - app-content-filter