diff --git a/README.md b/README.md index fa5c9cb..541bf79 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ To provide a lightweight experience, the VM uses [XFCE](https://xfce.org/) as a - Docker 19.03.5 - Docker Compose 1.25.0 -- Ansible 3.3.0 +- Ansible 2.9.4 ## Prerequisites diff --git a/Vagrantfile b/Vagrantfile index f3c5c86..f330849 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -76,18 +76,7 @@ Vagrant.configure(2) do |config| ansible.compatibility_mode = "2.0" ansible.install_mode = "pip" ansible.pip_install_cmd = "sudo apt install -y python3-distutils && curl https://bootstrap.pypa.io/get-pip.py | sudo python3" - # 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.version = "2.10.8" ansible.playbook = "provisioning/playbook.yml" #ansible.inventory_path = "provisioning/inventory" ansible.galaxy_role_file = "provisioning/requirements.yml" diff --git a/provisioning/playbook.yml b/provisioning/playbook.yml index 2e6f86e..9e5bd14 100644 --- a/provisioning/playbook.yml +++ b/provisioning/playbook.yml @@ -2,14 +2,8 @@ gather_facts: yes become: yes - roles: - - jotbe.common - - geerlingguy.pip - - geerlingguy.docker - - jotbe.dev_tools - vars: - ansible_version: "3.3.0" + ansible_version: "2.9.4" pip_install_packages: - name: docker - name: docker-compose @@ -30,10 +24,6 @@ raw: test -e /usr/bin/pip3 || (apt update && apt install -y --force-yes python3-pip) changed_when: false - - name: Install Ansible - raw: which ansible || pip3 install ansible=={{ ansible_version }} - changed_when: false - tasks: - block: - name: Provide VBoxGuestAdditions patch @@ -46,6 +36,10 @@ 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 @@ -87,4 +81,10 @@ - name: Reboot system reboot: - when: desktop_installed.changed \ No newline at end of file + when: desktop_installed.changed + + roles: + - jotbe.common + - geerlingguy.pip + - geerlingguy.docker + - jotbe.dev_tools \ No newline at end of file