From 5b163de2fd026c7b3d33919d9e91786dff898ce7 Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Tue, 16 Jun 2015 00:39:40 +0200 Subject: [PATCH] Installazione dipendenze python per mac2hostname --- roles/pxe/tasks/mac2hostname.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/roles/pxe/tasks/mac2hostname.yml b/roles/pxe/tasks/mac2hostname.yml index e6d63cc..446c8ea 100644 --- a/roles/pxe/tasks/mac2hostname.yml +++ b/roles/pxe/tasks/mac2hostname.yml @@ -3,7 +3,16 @@ # Grazie per il servizio a Enrico Bacis - name: Installazione dipendenze Python - yum: pkg=python-bottle state=present + 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 @@ -22,3 +31,21 @@ - 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 + +