Aggiunto task per scaricare parte di gestione client ansible. Taggati task per debug.

This commit is contained in:
Emiliano Vavassori 2015-04-15 18:12:38 +02:00
parent 0e4508f9ff
commit ee97aa74d3
6 changed files with 26 additions and 12 deletions

View File

@ -4,4 +4,6 @@ Qui sono presenti i files di configurazione per il server ClearOS.
Per configurarlo:
$ vim hosts
$ ansible-playbook server.yml --ask-pass
$ ansible-playbook firstsetup.yml -u root --ask-pass \
-e "admin_sshkey=/path/to/id_rsa.pub"
$ ansible-playbook server.yml

2
hosts
View File

@ -1,4 +1,4 @@
[server]
pdc ansible_ssh_host=10.0.0.1
pdc ansible_ssh_host=10.0.0.1 ansible_ssh_user=amgmt
[clients]

View File

@ -3,58 +3,58 @@
- name: Verifica configurazione CentOS 6
file: name=/etc/yum.repos.d/CentOS-Base.repo state=file
sudo: yes
remote_user: amgmt
ignore_errors: yes
register: check_repos
tags: repo
- name: Scarico configurazione per CentOS 6
get_url:
url: http://mirror.centos.org/centos/6/os/x86_64/Packages/centos-release-6-6.el6.centos.12.2.x86_64.rpm
dest: /tmp/centos-release-6-6.el6.centos.12.2.x86_64.rpm
sudo: yes
remote_user: amgmt
when: check_repos|failed
tags: repo
- name: Scompatto configurazione CentOS 6
shell: mkdir -p /tmp/centos-release && pushd /tmp/centos-release && rpm2cpio ../centos-release-6-6.el6.centos.12.2.x86_64.rpm | cpio -idmv && popd
sudo: yes
remote_user: amgmt
when: check_repos|failed
tags: repo
- name: Copio i repository
shell: cp -f /tmp/centos-release/etc/yum.repos.d/* /etc/yum.repos.d/
sudo: yes
remote_user: amgmt
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/
sudo: yes
remote_user: amgmt
when: check_repos|failed
tags: repo
# Senza di questa, non è possibile installare EPEL dopo
- name: Prima attivazione repo
shell: yum clean all && yum repolist
sudo: yes
remote_user: amgmt
when: centos_repo_installed|changed
tags: repo
- name: Attivo EPEL
yum: name=epel-release state=present
sudo: yes
remote_user: amgmt
register: epel_installed
tags: repo
- name: Seconda attivazione repo
shell: yum clean all && yum repolist
sudo: yes
remote_user: amgmt
when: epel_installed|changed
tags: repo
- name: Pulizia
shell: rm -rf /tmp/centos-release && rm -f /tmp/centos-release-6-6.el6.centos.12.2.x86_64.rpm /tmp/epel-release-6-8.noarch.rpm
sudo: yes
remote_user: amgmt
when: check_repos|failed
tags: repo

View File

@ -0,0 +1,10 @@
---
- name: Download della gestione client con ansible
git: repo=http://github.com/syntaxerrormmm/ps-clientmgmt.git
dest=/root/clientmgmt
remote_user: amgmt
sudo: yes
tags:
- git
- ansible

View File

@ -5,3 +5,5 @@
- include: packages.yml
when: ansible_os_family == 'ClearOS'
- include: ansible.yml

View File

@ -3,7 +3,6 @@
- name: Installo pacchetti di gestione
yum: name={{ item }} state=present
sudo: yes
remote_user: amgmt
when: ansible_os_family == 'ClearOS'
with_items:
- vim-enhanced
@ -11,3 +10,4 @@
- screen
- sshpass
- ansible
tags: pkg