aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Skultety <eskultet@redhat.com>2023-07-21 14:38:40 +0200
committerErik Skultety <eskultet@redhat.com>2023-08-31 10:17:50 +0200
commit05c50d2cb798a3e7cb201a4fe2acb459ef03c50a (patch)
tree29256d1dc657c4c62efa2de76279a24433c6ee39
parent6a08694305af864519d22019aeba83d17849914f (diff)
downloadlibvirt-ci-05c50d2cb798a3e7cb201a4fe2acb459ef03c50a.zip
libvirt-ci-05c50d2cb798a3e7cb201a4fe2acb459ef03c50a.tar.gz
libvirt-ci-05c50d2cb798a3e7cb201a4fe2acb459ef03c50a.tar.bz2
ansible: Bump the minimum Ansible version to 2.10+
It's getting harder to get around with only the builtin modules and we'll need to use some of the curated community modules. The split of Ansible into 'ansible-core' and 'ansible community (aka ansible)' happened in v2.10. The way this patch enforces the version used in by delegating a version check task to localhost, failing if the control node doesn't meet the minimum version. 2.10 is pretty common these days, so essentially only users on Debian-10 would be impacted by this, but then again, installing from PyPI is a simple workaround in that case. Signed-off-by: Erik Skultety <eskultet@redhat.com>
-rw-r--r--docs/installation.rst8
-rw-r--r--lcitool/ansible/playbooks/update/main.yml10
2 files changed, 17 insertions, 1 deletions
diff --git a/docs/installation.rst b/docs/installation.rst
index 9d60463..e608ca0 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -56,7 +56,13 @@ single step with:
$ pip3 install .["vm_support"]
where ``vm_support`` denotes the same set of dependencies as extra dependencies
-in a way ``pip`` recognizes for installable packages.
+in a way ``pip`` recognizes for installable packages. Additionally, for the
+VM use case we require some of the *general* Ansible community modules, so
+**Ansible >= 2.10** along with the corresponding Ansible community collections
+package (often called simply ``ansible``) is required. This is only relevant if
+you install most of your packages from the OS package management software. If
+you use the ``pip`` method no action is needed, it'll do the right thing.
+
Development dependencies
~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lcitool/ansible/playbooks/update/main.yml b/lcitool/ansible/playbooks/update/main.yml
index a9bfe56..e8587f3 100644
--- a/lcitool/ansible/playbooks/update/main.yml
+++ b/lcitool/ansible/playbooks/update/main.yml
@@ -1,4 +1,14 @@
---
+- hosts: all
+ gather_facts: false
+ tasks:
+ - name: Ansible version check
+ assert:
+ that: ansible_version.full is version('2.10', '>=')
+ fail_msg: "Please install Ansible >=2.10"
+ quiet: true
+ delegate_to: localhost
+
- import_playbook: user-pre.yml
- import_playbook: bootstrap.yml
- import_playbook: setup.yml