59 lines
1.5 KiB
YAML
Executable File
59 lines
1.5 KiB
YAML
Executable File
#!/usr/bin/env ansible-playbook
|
|
---
|
|
# root is the first playbook to launch (as root) whe initiation a new server
|
|
|
|
- hosts: server
|
|
tasks:
|
|
- name: Check if mirror.adm is defined in /etc/hosts
|
|
lineinfile:
|
|
state: absent
|
|
path: /etc/hosts
|
|
regexp: '^{{ glob_mirror.ip }}'
|
|
check_mode: True
|
|
changed_when: False
|
|
register: check_mirror
|
|
|
|
- name: Define mirror.adm.crans.org if it doesn't exist.
|
|
lineinfile:
|
|
path: /etc/hosts
|
|
line: '{{ glob_mirror.ip }} {{ glob_mirror.name }}'
|
|
insertafter: '127.0.0.1 localhost'
|
|
when: check_mirror.found == 0
|
|
|
|
- hosts: virtu
|
|
roles:
|
|
- proxmox-apt-sources
|
|
|
|
- hosts: server
|
|
roles:
|
|
- debian-apt-sources
|
|
|
|
- import_playbook: baie.yml
|
|
- import_playbook: utilities.yml
|
|
- import_playbook: slapd.yml
|
|
|
|
- hosts: server
|
|
vars:
|
|
ldap: '{{ glob_ldap | combine(loc_ldap | default({})) }}'
|
|
roles:
|
|
- ldap-client
|
|
|
|
- hosts: server,!ovh_physical,!tealc.adm.crans.org,!zamok.adm.crans.org,!gulp.cachan-adm.crans.org
|
|
vars:
|
|
home_nounou: "{{ glob_home_nounou | default({}) | combine(loc_home_nounou | default({})) }}"
|
|
roles:
|
|
- home-nounou
|
|
|
|
- hosts: all, !rsyslog_server
|
|
vars:
|
|
rsyslog_client: "{{ glob_rsyslog_client | default({}) | combine(loc_rsyslog_client | default({})) }}"
|
|
roles:
|
|
- rsyslog-client
|
|
|
|
- import_playbook: scripts.yml
|
|
- import_playbook: vm_setup.yml
|
|
- import_playbook: borgbackup_client.yml
|
|
- import_playbook: monitoring.yml
|
|
- import_playbook: network_interfaces.yml
|
|
- import_playbook: nullmailer.yml
|