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

86 lines
2.2 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-{{ EOLE_VERSION }} main cloud
state: present
- name: Adding EOLE security repository
apt_repository:
repo: deb [arch=amd64] http://eole.ac-dijon.fr/eole eole-{{ EOLE_VERSION }}-security main cloud
state: present
- name: Adding EOLE updates repository
apt_repository:
repo: deb [arch=amd64] http://eole.ac-dijon.fr/eole eole-{{ EOLE_VERSION }}-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 chromium browser on 2.7.2
apt:
name: chromium-browser
environment:
HTTP_PROXY: "{{ http_proxy }}"
HTTPS_PROXY: "{{ https_proxy }}"
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"
when: EOLE_VERSION == "2.7.2"
- 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 }}"