90 lines
No EOL
2.2 KiB
YAML
90 lines
No EOL
2.2 KiB
YAML
- hosts: all
|
|
gather_facts: yes
|
|
become: yes
|
|
|
|
vars:
|
|
ansible_version: "2.9.4"
|
|
pip_install_packages:
|
|
- name: docker
|
|
- name: docker-compose
|
|
docker_edition: "ce"
|
|
docker_version: "19.03.5"
|
|
docker_package: "docker-{{ docker_edition }}"
|
|
docker_package_state: present
|
|
docker_compose_version: "1.25.0"
|
|
docker_users:
|
|
- vagrant
|
|
|
|
pre_tasks:
|
|
- name: Install Python3
|
|
raw: test -e /usr/bin/python3 || (apt update && apt install -y --force-yes python3)
|
|
changed_when: false
|
|
|
|
- name: Install pip3
|
|
raw: test -e /usr/bin/pip3 || (apt update && apt install -y --force-yes python3-pip)
|
|
changed_when: false
|
|
|
|
tasks:
|
|
- block:
|
|
- name: Provide VBoxGuestAdditions patch
|
|
copy:
|
|
src: files/vbox-add-6.1.18.patch
|
|
dest: /tmp/vbox-add-6.1.18.patch
|
|
|
|
- name: Patch VBoxGuestAdditions
|
|
shell: "patch -s -N -u /opt/VBoxGuestAdditions-6.1.18/init/vboxadd -i /tmp/vbox-add-6.1.18.patch"
|
|
ignore_errors: yes
|
|
when: virtualbox_host_version | default("") == "6.1.18"
|
|
|
|
- name: Install Ansible
|
|
raw: test -e /usr/local/bin/ansible || pip3 install ansible={{ ansible_version }}
|
|
changed_when: false
|
|
|
|
- name: Disable motd-news
|
|
lineinfile:
|
|
path: /etc/default/motd-news
|
|
regexp: '^\s*ENABLED=\s*1'
|
|
line: ENABLED=0
|
|
ignore_errors: yes
|
|
|
|
- name: Update apt cache
|
|
apt:
|
|
update_cache: yes
|
|
cache_valid_time: 7200
|
|
|
|
- name: Install XFCE4 and lightdm
|
|
apt:
|
|
pkg:
|
|
- lightdm
|
|
- xfce4
|
|
register: desktop_installed
|
|
|
|
- name: lightdm config
|
|
copy:
|
|
dest: /etc/lightdm/lightdm.conf
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
content: |
|
|
[SeatDefaults]
|
|
allow-guest=false
|
|
autologin-user=vagrant
|
|
autologin-user-timeout=0
|
|
user-session=xfce
|
|
|
|
- name: Install browsers
|
|
apt:
|
|
pkg:
|
|
- firefox-esr
|
|
- chromium
|
|
register: browsers_installed
|
|
|
|
- name: Reboot system
|
|
reboot:
|
|
when: desktop_installed.changed
|
|
|
|
roles:
|
|
- jotbe.common
|
|
- geerlingguy.pip
|
|
- geerlingguy.docker
|
|
- jotbe.dev_tools |