Modificato ruolo prereq per essere più idempotente. Aggiunta configurazione NTP.

This commit is contained in:
Emiliano Vavassori 2015-07-12 21:17:32 +02:00
parent ff6b5e076f
commit 44d552409e
3 changed files with 24 additions and 0 deletions

View File

@ -6,3 +6,8 @@
tags:
- domain
- gui
- include: ntp.yml
tags:
- domain
- ntp

View File

@ -0,0 +1,14 @@
---
- name: Installazione ntp
apt: name=ntp state=present
sudo: yes
- name: Configurazione ntp
template: src=ntp.conf dest=/etc/ntp.conf backup=yes owner=root group=root mode=0644
sudo: yes
register: cfg_ntp
- name: Riavvio ntp
service: name=ntp state=restarted
sudo: yes
when: cfg_ntp|changed

View File

@ -1,11 +1,16 @@
---
- name: Verifica impostazioni di dominio
stat: path=/etc/domain.yml
register: domainstat
- name: Download impostazioni dominio
get_url:
url: "http://{{ ansible_default_ipv4.gateway }}:3001/domain"
dest: /etc/domain.yml
owner: root
mode: 0644
when: domainstat.exists == False
- name: Carico le variabili di dominio nel playbook per l'uso
include_vars: /etc/domain.yml