Aggiunto ruolo ansiblehelper. Aggiunto come dipendenza, taggato con ansiblehelper.

This commit is contained in:
Emiliano Vavassori 2015-07-08 01:23:29 +02:00
parent 75070f67c2
commit 56f92ba8f0
3 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,59 @@
---
# Installa e configura il servizio per aiutare ansible-pull
- name: Installazione dipendenze Python
yum: pkg=python-bottle state=present
sudo: yes
- name: Check installazione + versione ansiblehelper
shell: rpm -q ansiblehelper
ignore_errors: yes
register: check_ansiblehelper_pkg
changed_when: check_ansiblehelper_pkg.rc != 0 or check_ansiblehelper_pkg.stdout.find('1.0.0-1') == -1
- name: Installazione ansiblehelper
yum: pkg=http://syntaxerrormmm.zapto.org/downloads/rpm/ansiblehelper-1.0.0-1.el6.noarch.rpm state=present
when: check_ansiblehelper_pkg|changed
sudo: yes
- name: Verifica aggiunta servizi
shell: /sbin/e-smith/db configuration show ansiblehelper
sudo: yes
register: chk_ansiblehelper_srv
changed_when: chk_ansiblehelper_srv.rc != 0
ignore_errors: yes
- name: Aggiungo il servizio ai servizi gestiti da NethServer
shell: /sbin/e-smith/db configuration set ansiblehelper service status enabled TCPPort 3001 access private
sudo: yes
when: chk_ansiblehelper_srv|changed
- name: Default per NetServer - Cartella defaults
shell: mkdir -p /etc/e-smith/db/configuration/defaults/ansiblehelper
sudo: yes
when: chk_ansiblehelper_srv|changed
- name: Default per NethServer - Tipo
shell: echo "service" > /etc/e-smith/db/configuration/defaults/ansiblehelper/type
sudo: yes
when: chk_ansiblehelper_srv|changed
- name: Default per NethServer - Stato
shell: echo "enabled" > /etc/e-smith/db/configuration/defaults/ansiblehelper/status
sudo: yes
when: chk_ansiblehelper_srv|changed
- name: Aggiunta servizio
shell: /sbin/e-smith/signal-event runlevel-adjust
sudo: yes
when: chk_ansiblehelper_srv|changed
- name: Aggiunta servizio di rete e cambio firewall
shell: /sbin/e-smith/signal-event firewall-adjust
sudo: yes
when: chk_ansiblehelper_srv|changed
- name: Avvio di ansiblehelper
shell: service ansiblehelper start
sudo: yes
when: chk_ansiblehelper_srv|changed

View File

@ -0,0 +1,3 @@
---
- include: ansiblehelper.yml
tags: ansiblehelper

View File

@ -4,3 +4,4 @@ dependencies:
- { role: ubuntu-mirror, tags: [ 'client-install', 'ubuntu-mirror' ] }
- { role: mac2hostname, tags: [ 'client-install', 'mac2hostname' ] }
- { role: git-daemon, tags: [ 'client-install', 'git-daemon' ] }
- { role: ansiblehelper, tags: [ 'client-install', 'ansiblehelper' ] }