diff --git a/base.yml b/base.yml index 2b7a26369ee2681936f5000b0e7932475d2ddf1d..fcaee722b2c96dcf1c4fb12949e3cab66105eacc 100644 --- a/base.yml +++ b/base.yml @@ -1,5 +1,9 @@ --- # Playbook to deploy common Crans configuration and tools - hosts: all + vars: + # Debian mirror on adm + debian_mirror: http://mirror.adm.crans.org/debian roles: + - debian-apt-sources - common-tools diff --git a/monitoring.yml b/monitoring.yml index 98b372fa4ba8a0c4e5eb8b9a432002671afe6d83..7918cef28b159e4ef3ad083f3fbff804291e533d 100644 --- a/monitoring.yml +++ b/monitoring.yml @@ -12,7 +12,7 @@ - targets: [pulsar.adm.crans.org] # Debian non-free mirror - debian_mirror: http://ftp.adm.crans.org/debian/ + debian_mirror: http://mirror.adm.crans.org/debian roles: - debian-non-free - prometheus diff --git a/roles/debian-apt-sources/tasks/main.yml b/roles/debian-apt-sources/tasks/main.yml new file mode 100644 index 0000000000000000000000000000000000000000..24c5fc4e520e5a4ab990ef4196c7a566d075fea2 --- /dev/null +++ b/roles/debian-apt-sources/tasks/main.yml @@ -0,0 +1,5 @@ +--- +- name: Configure Debian repositories + template: + src: apt/sources.list.j2 + dest: /etc/apt/sources.list diff --git a/roles/debian-apt-sources/templates/apt/sources.list.j2 b/roles/debian-apt-sources/templates/apt/sources.list.j2 new file mode 100644 index 0000000000000000000000000000000000000000..ad448e64c7da3c320db73a1c5c666c7d038f5651 --- /dev/null +++ b/roles/debian-apt-sources/templates/apt/sources.list.j2 @@ -0,0 +1,14 @@ +# {{ ansible_managed }} + +# Mises à jour de sécurité +deb {{ debian_mirror }}-security {{ ansible_lsb.codename }}/updates main +deb-src {{ debian_mirror }}-security {{ ansible_lsb.codename }}/updates main + +# Dépôt classique +deb {{ debian_mirror }} {{ ansible_lsb.codename }} main +deb-src {{ debian_mirror }} {{ ansible_lsb.codename }} main + +# Dépôt pour mises à jour fréquentes (volatile) +deb {{ debian_mirror }} {{ ansible_lsb.codename }}-updates main +deb-src {{ debian_mirror }} {{ ansible_lsb.codename }}-updates main +