---
|
|
|
|
# Tâches pour Debian 9 ou supérieur
|
|
- import_tasks: debianbase.yml
|
|
when: ansible_os_family == 'Debian' and ansible_distribution_major_version | int >= 9
|
|
|
|
# Tâches pour CentOS 7 ou supérieur
|
|
- import_tasks: centosbase.yml
|
|
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version | int >= 7
|
|
|
|
# Module TIMEZONE: http://docs.ansible.com/ansible/latest/timezone_module.html
|
|
- name: Configuration de la timezone
|
|
timezone:
|
|
name: "{{ timezone }}"
|
|
|
|
- name: Déploiement du motd
|
|
template:
|
|
src: motd.j2
|
|
dest: /etc/motd
|
|
tags: motd
|
|
notify: restart ssh
|
|
|
|
- name: Déploiement d'une tâche cron
|
|
cron:
|
|
name: "Tache cron de test"
|
|
minute: "12"
|
|
hour: "12"
|
|
job: "echo 'Hello World'"
|