fabrica/packer/provisioning/playbooks/eole/eole.yml

76 lines
1.9 KiB
YAML

---
- name: Transform Ubuntu into an EOLE Server
hosts: all
tasks:
- name: Stop and disable unattended-upgrades service
service:
name: unattended-upgrades
state: stopped
enabled: no
- name: Stop apt-daily service
service:
name: apt-daily
state: stopped
enabled: no
- name: Stop apt-daily.timer service
service:
name: apt-daily.timer
state: stopped
enabled: no
- name: Stop apt-daily-upgrade service
service:
name: apt-daily-upgrade
state: stopped
enabled: no
- pause:
seconds: 30
- name: Install a EOLE Keyring from the internet.
apt:
deb: http://eole.ac-dijon.fr/eole/pool/main/e/eole-keyring/eole-archive-keyring_2020.05.12-1_all.deb
retries: 5
delay: 5
environment:
HTTP_PROXY: "{{ http_proxy }}"
HTTPS_PROXY: "{{ https_proxy }}"
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"
- name: Adding EOLE main repository
apt_repository:
repo: deb [arch=amd64] http://eole.ac-dijon.fr/eole eole-2.7.2 main cloud
state: present
- name: Adding EOLE security repository
apt_repository:
repo: deb [arch=amd64] http://eole.ac-dijon.fr/eole eole-2.7.2-security main cloud
state: present
- name: Adding EOLE updates repository
apt_repository:
repo: deb [arch=amd64] http://eole.ac-dijon.fr/eole eole-2.7.2-updates main cloud
state: present
- name: Update cache
apt:
update_cache: yes
environment:
HTTP_PROXY: "{{ http_proxy }}"
HTTPS_PROXY: "{{ https_proxy }}"
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"
- name: Install eole-server and eole-exim-pkg
apt:
name: eole-server,eole-exim-pkg
environment:
HTTP_PROXY: "{{ http_proxy }}"
HTTPS_PROXY: "{{ https_proxy }}"
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"