Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Problem: Ansible gives a poor error message when its version is too old
Browse files Browse the repository at this point in the history
and it sees new syntax.

Solution: Add a pre_task to check the ansible version.

re: #5558
Add ansible-pulp logic to grab epel-release from the internet
https://pulp.plan.io/issues/5558

[noissue]
  • Loading branch information
mikedep333 committed Oct 9, 2019
1 parent 7293509 commit d4f66cb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions example-source/playbook.yml
@@ -1,5 +1,13 @@
---
- hosts: all
pre_tasks:
# The version string below is the highest of all those in roles' metadata:
# "min_ansible_version". It needs to be kept manually up-to-date.
- name: Verify Ansible meets min required version
assert:
that: "ansible_version.full is version_compare('2.8', '>=')"
msg: >
"You must update Ansible to at least 2.8 to use this version of Pulp 3 Installer."
roles:
- pulp-database
- pulp-workers
Expand Down
8 changes: 8 additions & 0 deletions example-use/playbook.yml
@@ -1,5 +1,13 @@
---
- hosts: all
pre_tasks:
# The version string below is the highest of all those in roles' metadata:
# "min_ansible_version". It needs to be kept manually up-to-date.
- name: Verify Ansible meets min required version
assert:
that: "ansible_version.full is version_compare('2.8', '>=')"
msg: >
"You must update Ansible to at least 2.8 to use this version of Pulp 3 Installer."
roles:
- pulp-database
- pulp-workers
Expand Down

0 comments on commit d4f66cb

Please sign in to comment.