2015-06-15 01:32:57 +00:00
---
# Installa e configura il servizio per rinominare il client
# Grazie per il servizio a Enrico Bacis
- name : Installazione dipendenze Python
2015-06-15 22:45:27 +00:00
yum : pkg=python-bottle state=present
2015-06-15 01:32:57 +00:00
sudo : yes
- name : Creazione directory necessarie
file : path={{ item }} state=directory
with_items :
- /var/lib/mac2hostname
- /var/run/mac2hostname
- /var/log/mac2hostname
- /usr/share/mac2hostname
sudo : yes
- name : Copia dello script
copy : src=mac2hostname.py dest=/usr/share/mac2hostname/mac2hostname.py mode=0755
sudo : yes
- name : Finalizzazione della copia
file : src=/usr/share/mac2hostname/mac2hostname.py dest=/usr/bin/mac2hostname state=link
sudo : yes
2015-06-15 22:39:40 +00:00
- name : Aggiunto oggetto servizio mac2hostname
shell : /sbin/e-smith/db fwservices set mac2hostname fwservice Description "mac2hostname service" Ports 3000 Protocol tcp
sudo : yes
- name : Attivo modifiche a livello di servizio
shell : /sbin/e-smith/signal-event firewall-objects-modify
sudo : yes
- name : Aggiungo regola firewall mac2hostname
shell : /sbin/e-smith/db fwrules set 1 rule Action accept Description "mac2hostname allow local traffic" Dst any Log none Position 64 service "fwservice;mac2hostname" Src "role;green" status enabled
sudo : yes
- name : Attivo modifiche firewall
shell : /sbin/e-smith/signal-event firewall-adjust
sudo : yes