Compare commits
2 commits
c01feb19b8
...
a1a8ccbd4b
Author | SHA1 | Date | |
---|---|---|---|
a1a8ccbd4b | |||
a0717868ae |
3 changed files with 25 additions and 14 deletions
|
@ -10,7 +10,7 @@ To provide a lightweight experience, the VM uses [XFCE](https://xfce.org/) as a
|
||||||
|
|
||||||
- Docker 19.03.5
|
- Docker 19.03.5
|
||||||
- Docker Compose 1.25.0
|
- Docker Compose 1.25.0
|
||||||
- Ansible 2.9.4
|
- Ansible 3.3.0
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
|
|
13
Vagrantfile
vendored
13
Vagrantfile
vendored
|
@ -76,7 +76,18 @@ Vagrant.configure(2) do |config|
|
||||||
ansible.compatibility_mode = "2.0"
|
ansible.compatibility_mode = "2.0"
|
||||||
ansible.install_mode = "pip"
|
ansible.install_mode = "pip"
|
||||||
ansible.pip_install_cmd = "sudo apt install -y python3-distutils && curl https://bootstrap.pypa.io/get-pip.py | sudo python3"
|
ansible.pip_install_cmd = "sudo apt install -y python3-distutils && curl https://bootstrap.pypa.io/get-pip.py | sudo python3"
|
||||||
ansible.version = "2.10.8"
|
# The following will not work properly since the split of Ansible into ansible-base (soon ansible-core)
|
||||||
|
# and the Ansible collections and modules both together resembling Ansible.
|
||||||
|
# `ansible --version` will yield the ansible-base version and this command is used by ansible_local.
|
||||||
|
# It is not suitable to figure out which Ansible distribution/bundle was installed.
|
||||||
|
# To workaround the wrongful mismatch result when installing Ansible through Vagrant,
|
||||||
|
# we have to leave ansible.version empty/unset and use ansible.pip_args to provide the desired version.
|
||||||
|
#
|
||||||
|
# See also:
|
||||||
|
# - https://www.ansible.com/blog/ansible-3.0.0-qa
|
||||||
|
# - https://github.com/hashicorp/vagrant/issues/12204
|
||||||
|
#ansible.version = "3.3.0"
|
||||||
|
ansible.pip_args = "ansible==3.3.0" # Will install ansible-base==2.10.8, ansible --version will yield 2.10.8
|
||||||
ansible.playbook = "provisioning/playbook.yml"
|
ansible.playbook = "provisioning/playbook.yml"
|
||||||
#ansible.inventory_path = "provisioning/inventory"
|
#ansible.inventory_path = "provisioning/inventory"
|
||||||
ansible.galaxy_role_file = "provisioning/requirements.yml"
|
ansible.galaxy_role_file = "provisioning/requirements.yml"
|
||||||
|
|
|
@ -2,8 +2,14 @@
|
||||||
gather_facts: yes
|
gather_facts: yes
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
roles:
|
||||||
|
- jotbe.common
|
||||||
|
- geerlingguy.pip
|
||||||
|
- geerlingguy.docker
|
||||||
|
- jotbe.dev_tools
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
ansible_version: "2.9.4"
|
ansible_version: "3.3.0"
|
||||||
pip_install_packages:
|
pip_install_packages:
|
||||||
- name: docker
|
- name: docker
|
||||||
- name: docker-compose
|
- name: docker-compose
|
||||||
|
@ -24,6 +30,10 @@
|
||||||
raw: test -e /usr/bin/pip3 || (apt update && apt install -y --force-yes python3-pip)
|
raw: test -e /usr/bin/pip3 || (apt update && apt install -y --force-yes python3-pip)
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
|
- name: Install Ansible
|
||||||
|
raw: which ansible || pip3 install ansible=={{ ansible_version }}
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- block:
|
- block:
|
||||||
- name: Provide VBoxGuestAdditions patch
|
- name: Provide VBoxGuestAdditions patch
|
||||||
|
@ -36,10 +46,6 @@
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
when: virtualbox_host_version | default("") == "6.1.18"
|
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
|
- name: Disable motd-news
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/default/motd-news
|
path: /etc/default/motd-news
|
||||||
|
@ -81,10 +87,4 @@
|
||||||
|
|
||||||
- name: Reboot system
|
- name: Reboot system
|
||||||
reboot:
|
reboot:
|
||||||
when: desktop_installed.changed
|
when: desktop_installed.changed
|
||||||
|
|
||||||
roles:
|
|
||||||
- jotbe.common
|
|
||||||
- geerlingguy.pip
|
|
||||||
- geerlingguy.docker
|
|
||||||
- jotbe.dev_tools
|
|
Loading…
Add table
Reference in a new issue