52 lines
1.5 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
# Installa e configura il servizio per rinominare il client
# Grazie per il servizio a Enrico Bacis
- name: Installazione dipendenze Python
yum: pkg={{ item }} state=present
with_items:
- python-bottle
- python-devel
- python-pip
- python-virtualenv
sudo: yes
- name: Configuro con pip il pacchetto subprocess
shell: pip install subprocess
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
- 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