Updates Ansible to 3.3.0
This commit is contained in:
parent
a0717868ae
commit
972e6c0d87
3 changed files with 19 additions and 8 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
|
||||||
|
|
||||||
|
|
15
Vagrantfile
vendored
15
Vagrantfile
vendored
|
@ -74,9 +74,20 @@ Vagrant.configure(2) do |config|
|
||||||
dev.vm.provision "ansible_local" do |ansible|
|
dev.vm.provision "ansible_local" do |ansible|
|
||||||
#ansible.verbose = "vvv"
|
#ansible.verbose = "vvv"
|
||||||
ansible.compatibility_mode = "2.0"
|
ansible.compatibility_mode = "2.0"
|
||||||
ansible.install_mode = "pip"
|
ansible.install_mode = "pip_args_only"
|
||||||
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"
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
- jotbe.dev_tools
|
- 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
|
||||||
|
@ -30,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
|
||||||
|
@ -42,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
|
||||||
|
|
Loading…
Add table
Reference in a new issue