forked from LibreSchool/server-config
Aggiunto ruolo ansiblehelper. Aggiunto come dipendenza, taggato con ansiblehelper.
This commit is contained in:
parent
75070f67c2
commit
56f92ba8f0
59
roles/ansiblehelper/tasks/ansiblehelper.yml
Normal file
59
roles/ansiblehelper/tasks/ansiblehelper.yml
Normal 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
|
3
roles/ansiblehelper/tasks/main.yml
Normal file
3
roles/ansiblehelper/tasks/main.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
- include: ansiblehelper.yml
|
||||||
|
tags: ansiblehelper
|
@ -4,3 +4,4 @@ dependencies:
|
|||||||
- { role: ubuntu-mirror, tags: [ 'client-install', 'ubuntu-mirror' ] }
|
- { role: ubuntu-mirror, tags: [ 'client-install', 'ubuntu-mirror' ] }
|
||||||
- { role: mac2hostname, tags: [ 'client-install', 'mac2hostname' ] }
|
- { role: mac2hostname, tags: [ 'client-install', 'mac2hostname' ] }
|
||||||
- { role: git-daemon, tags: [ 'client-install', 'git-daemon' ] }
|
- { role: git-daemon, tags: [ 'client-install', 'git-daemon' ] }
|
||||||
|
- { role: ansiblehelper, tags: [ 'client-install', 'ansiblehelper' ] }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user