From 2d771f4989ecef00e6fd4d23aab04006ddb15253 Mon Sep 17 00:00:00 2001 From: Hans-Peter Wissenbach Date: Thu, 16 Mar 2023 11:03:04 +0000 Subject: [PATCH] Feature/dev 829 - ansible version updaten --- ansible-builder/context/Dockerfile | 2 +- create-database-backup.yml | 7 +++---- create-database.yml | 7 +++---- create-kibana-objects.yml | 7 +++---- create-realm.yml | 7 +++---- create-remote-database-backup.yml | 7 +++---- create-server.yml | 7 +++---- create-service.yml | 7 +++---- evil-remove-server.yml | 7 +++---- export-database.yml | 7 +++---- group_vars/all/versions.yml | 2 ++ hcloud_firewall.yml | 7 +++---- import-database.yml | 7 +++---- info.yml | 7 +++---- kubernetes.yml | 7 +++---- mobene.yml | 7 +++---- pip-requirements | 4 ++-- pmci-inventory-cluster.yml | 8 ++++---- prodwork01-infrastructure-realm.yml | 7 +++---- provisioning.yml | 7 +++---- remove-database.yml | 7 +++---- remove-realm.yml | 7 +++---- remove-server.yml | 7 +++---- remove-service.yml | 7 +++---- restore-database-backup.yml | 7 +++---- restore-remote-database-backup.yml | 7 +++---- setup.yml | 7 +++---- smardigo.yml | 7 +++---- update-docker-image.yml | 7 +++---- update-monitoring.yml | 7 +++---- update-service-state.yml | 7 +++---- update-ssh-config-file.yml | 7 +++---- upload-database-dumb.yml | 7 +++---- 33 files changed, 96 insertions(+), 123 deletions(-) diff --git a/ansible-builder/context/Dockerfile b/ansible-builder/context/Dockerfile index 23e823e..8ba76d7 100644 --- a/ansible-builder/context/Dockerfile +++ b/ansible-builder/context/Dockerfile @@ -1,4 +1,4 @@ -ARG EE_BASE_IMAGE=quay.io/ansible/ansible-runner:latest +ARG EE_BASE_IMAGE=quay.io/ansible/ansible-runner:stable-2.12-latest ARG EE_BUILDER_IMAGE=quay.io/ansible/ansible-builder:latest FROM $EE_BASE_IMAGE as galaxy diff --git a/create-database-backup.yml b/create-database-backup.yml index 4054f31..55636c4 100644 --- a/create-database-backup.yml +++ b/create-database-backup.yml @@ -28,12 +28,11 @@ gather_facts: false pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" diff --git a/create-database.yml b/create-database.yml index 42dff29..4161fac 100644 --- a/create-database.yml +++ b/create-database.yml @@ -34,12 +34,11 @@ connection: local pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" diff --git a/create-kibana-objects.yml b/create-kibana-objects.yml index cac0058..03021a9 100644 --- a/create-kibana-objects.yml +++ b/create-kibana-objects.yml @@ -27,12 +27,11 @@ connection: local pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" diff --git a/create-realm.yml b/create-realm.yml index c1b1898..c679571 100644 --- a/create-realm.yml +++ b/create-realm.yml @@ -28,12 +28,11 @@ connection: local pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" diff --git a/create-remote-database-backup.yml b/create-remote-database-backup.yml index 9e698cf..cbb2cee 100644 --- a/create-remote-database-backup.yml +++ b/create-remote-database-backup.yml @@ -26,12 +26,11 @@ gather_facts: false pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" diff --git a/create-server.yml b/create-server.yml index 30f30db..59a8036 100644 --- a/create-server.yml +++ b/create-server.yml @@ -21,12 +21,11 @@ connection: local pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" diff --git a/create-service.yml b/create-service.yml index 483fc28..85d20fd 100644 --- a/create-service.yml +++ b/create-service.yml @@ -22,12 +22,11 @@ connection: local pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" diff --git a/evil-remove-server.yml b/evil-remove-server.yml index 440e4ed..506f8a8 100644 --- a/evil-remove-server.yml +++ b/evil-remove-server.yml @@ -17,12 +17,11 @@ default: 'no' pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" delegate_to: 127.0.0.1 become: false diff --git a/export-database.yml b/export-database.yml index 47885eb..1c4b002 100644 --- a/export-database.yml +++ b/export-database.yml @@ -24,12 +24,11 @@ gather_facts: false pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" diff --git a/group_vars/all/versions.yml b/group_vars/all/versions.yml index 7790e90..9ea4ab2 100644 --- a/group_vars/all/versions.yml +++ b/group_vars/all/versions.yml @@ -27,3 +27,5 @@ traefik_version: "v2.8.5" connect_version: "10.4.12" iam_version: "10.0" webdav_version: "8.4.1" + +ansible_minimal_version: "2.12.0" diff --git a/hcloud_firewall.yml b/hcloud_firewall.yml index 27391c1..5c40f4e 100644 --- a/hcloud_firewall.yml +++ b/hcloud_firewall.yml @@ -15,12 +15,11 @@ connection: local pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" diff --git a/import-database.yml b/import-database.yml index 7927d5d..f076042 100644 --- a/import-database.yml +++ b/import-database.yml @@ -24,12 +24,11 @@ gather_facts: false pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" diff --git a/info.yml b/info.yml index c04d566..027dac0 100644 --- a/info.yml +++ b/info.yml @@ -6,12 +6,11 @@ become: false pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" - name: "Import autodiscover pre-tasks" import_tasks: tasks/autodiscover_pre_tasks.yml diff --git a/kubernetes.yml b/kubernetes.yml index 20f8739..5c7d844 100644 --- a/kubernetes.yml +++ b/kubernetes.yml @@ -7,12 +7,11 @@ ansible_ssh_host: "{{ stage_server_domain }}" pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" tags: - always diff --git a/mobene.yml b/mobene.yml index cdf1c0f..41b8291 100644 --- a/mobene.yml +++ b/mobene.yml @@ -9,12 +9,11 @@ serial: "{{ serial_number | default(10) }}" pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" tags: - always diff --git a/pip-requirements b/pip-requirements index 4f406b3..ac64252 100644 --- a/pip-requirements +++ b/pip-requirements @@ -1,6 +1,6 @@ -ansible==4.10.0 +ansible==5.10.0 ansible-builder -ansible-core==2.11.11 +ansible-core==2.12.10 ansible-lint==5.4.0 dnspython hcloud>=1.16.0 diff --git a/pmci-inventory-cluster.yml b/pmci-inventory-cluster.yml index c1c6f8b..7d5819a 100644 --- a/pmci-inventory-cluster.yml +++ b/pmci-inventory-cluster.yml @@ -33,12 +33,12 @@ when: - data is defined - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" + # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" add_host: diff --git a/prodwork01-infrastructure-realm.yml b/prodwork01-infrastructure-realm.yml index f52a08b..3ecdf19 100644 --- a/prodwork01-infrastructure-realm.yml +++ b/prodwork01-infrastructure-realm.yml @@ -8,12 +8,11 @@ become: yes pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" tags: - always diff --git a/provisioning.yml b/provisioning.yml index 890bbe0..ea1c7d4 100644 --- a/provisioning.yml +++ b/provisioning.yml @@ -7,12 +7,11 @@ become: no pre_tasks: - - name: "Checking ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" tags: - always diff --git a/remove-database.yml b/remove-database.yml index 7362132..98faa0f 100644 --- a/remove-database.yml +++ b/remove-database.yml @@ -26,12 +26,11 @@ gather_facts: false pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" diff --git a/remove-realm.yml b/remove-realm.yml index 7f181f2..7cabb6e 100644 --- a/remove-realm.yml +++ b/remove-realm.yml @@ -28,12 +28,11 @@ connection: local pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" diff --git a/remove-server.yml b/remove-server.yml index 29f0b14..053e709 100644 --- a/remove-server.yml +++ b/remove-server.yml @@ -26,12 +26,11 @@ connection: local pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" diff --git a/remove-service.yml b/remove-service.yml index 545296d..3c9cd50 100644 --- a/remove-service.yml +++ b/remove-service.yml @@ -22,12 +22,11 @@ connection: local pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" diff --git a/restore-database-backup.yml b/restore-database-backup.yml index b179030..15a0511 100644 --- a/restore-database-backup.yml +++ b/restore-database-backup.yml @@ -27,12 +27,11 @@ gather_facts: false pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" diff --git a/restore-remote-database-backup.yml b/restore-remote-database-backup.yml index 332fd28..326d345 100644 --- a/restore-remote-database-backup.yml +++ b/restore-remote-database-backup.yml @@ -26,12 +26,11 @@ gather_facts: false pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" diff --git a/setup.yml b/setup.yml index febe74d..066c13d 100644 --- a/setup.yml +++ b/setup.yml @@ -10,12 +10,11 @@ become: yes pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" tags: - always diff --git a/smardigo.yml b/smardigo.yml index 8a85cd4..6da73e0 100644 --- a/smardigo.yml +++ b/smardigo.yml @@ -8,12 +8,11 @@ become: yes pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" tags: - always diff --git a/update-docker-image.yml b/update-docker-image.yml index d37f141..d2d5726 100644 --- a/update-docker-image.yml +++ b/update-docker-image.yml @@ -23,12 +23,11 @@ connection: local pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" diff --git a/update-monitoring.yml b/update-monitoring.yml index 924e05b..1a2a040 100644 --- a/update-monitoring.yml +++ b/update-monitoring.yml @@ -19,12 +19,11 @@ connection: local pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" diff --git a/update-service-state.yml b/update-service-state.yml index 1510774..4fc14f6 100644 --- a/update-service-state.yml +++ b/update-service-state.yml @@ -21,12 +21,11 @@ connection: local pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" diff --git a/update-ssh-config-file.yml b/update-ssh-config-file.yml index 613cd02..7b76a9c 100644 --- a/update-ssh-config-file.yml +++ b/update-ssh-config-file.yml @@ -14,12 +14,11 @@ gather_facts: false pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" diff --git a/upload-database-dumb.yml b/upload-database-dumb.yml index 4b1c54b..2a91af0 100644 --- a/upload-database-dumb.yml +++ b/upload-database-dumb.yml @@ -23,12 +23,11 @@ gather_facts: false pre_tasks: - - name: "Check if ansible version is at least 2.10.x" + - name: "Check if ansible version is at least {{ ansible_minimal_version }}" assert: that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" + - ansible_version.string is version(ansible_minimal_version, ">=") + msg: "The ansible version has to be at least {{ ansible_minimal_version }}" tasks: - name: "Add maria servers to hosts if necessary"