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

Commit

Permalink
Adding ansible 3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
fao89 committed Mar 10, 2021
1 parent aed9001 commit 535c3aa
Show file tree
Hide file tree
Showing 23 changed files with 34 additions and 38 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/pull_request.yml
Expand Up @@ -41,9 +41,9 @@ jobs:
python: "2.7"
toxpy: "27"
- test_type: source-static
ansible: "2.9"
python: "3.6"
toxpy: "36"
ansible: "3.0"
python: "3.9"
toxpy: "39"
- test_type: packages-static
ansible: "2.10"
python: "3.7"
Expand All @@ -57,9 +57,9 @@ jobs:
python: "3.8"
toxpy: "38"
- test_type: packages-dynamic
ansible: "2.9"
python: "3.7"
toxpy: "37"
ansible: "3.0"
python: "3.9"
toxpy: "39"
- test_type: release-upgrade
ansible: "2.9"
python: "2.7"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/install.sh
Expand Up @@ -34,7 +34,7 @@ rm ./$VAGRANT_SSHFS_DEB
# https://github.com/ansible/ansible/issues/71528#issuecomment-729778048
sudo apt remove ansible
pip3 install -U pip
pip3 install "ansible>2.9.15,<3"
pip3 install "ansible>2.9.15"

# qemu-kvm has gone from a tiny package to a virtual package in Qemu 5.2.
# Workaround the PPA's virtual package not existing or properly depending on qemu-system-x86.
Expand Down
1 change: 1 addition & 0 deletions CHANGES/8365.feature
@@ -0,0 +1 @@
Adding ansible 3 support
1 change: 1 addition & 0 deletions CHANGES/8365.removal
@@ -0,0 +1 @@
Removing ansible 2.8 support
2 changes: 1 addition & 1 deletion meta/runtime.yml
@@ -1,3 +1,3 @@
---
# https://docs.ansible.com/ansible/latest/dev_guide/developing_collections.html#meta-directory
requires_ansible: ">=2.9,<3"
requires_ansible: ">=2.9,<3.1"
4 changes: 2 additions & 2 deletions playbooks/example-source/playbook.yml
Expand Up @@ -5,9 +5,9 @@
# "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', '>=')"
that: "ansible_version.full is version_compare('2.9', '>=')"
msg: >
"You must update Ansible to at least 2.8 to use this version of Pulp 3 Installer."
"You must update Ansible to at least 2.9 to use this version of Pulp 3 Installer."
roles:
- pulp_all_services
- pulp_devel
Expand Down
4 changes: 2 additions & 2 deletions playbooks/example-use/playbook.yml
Expand Up @@ -5,9 +5,9 @@
# "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', '>=')"
that: "ansible_version.full is version_compare('2.9', '>=')"
msg: >
"You must update Ansible to at least 2.8 to use this version of Pulp 3 Installer."
"You must update Ansible to at least 2.9 to use this version of Pulp 3 Installer."
roles:
- pulp_all_services
environment:
Expand Down
2 changes: 1 addition & 1 deletion roles/pulp_all_services/meta/main.yml
Expand Up @@ -5,7 +5,7 @@ galaxy_info:
issue_tracker_url: https://pulp.plan.io/projects/pulp/issues/new
license: GPL-2.0-or-later
company: Red Hat
min_ansible_version: 2.8
min_ansible_version: 2.9
platforms:
- name: Debian
versions:
Expand Down
2 changes: 1 addition & 1 deletion roles/pulp_api/meta/main.yml
Expand Up @@ -5,7 +5,7 @@ galaxy_info:
issue_tracker_url: https://pulp.plan.io/projects/pulp/issues/new
license: GPL-2.0-or-later
company: Red Hat
min_ansible_version: 2.8
min_ansible_version: 2.9
platforms:
- name: Debian
versions:
Expand Down
10 changes: 0 additions & 10 deletions roles/pulp_api/tasks/main.yml
Expand Up @@ -63,14 +63,4 @@
when:
- (ansible_version.major > 2) or (ansible_version.major == 2 and ansible_version.minor >= 9)

- name: Extract token authentication public key (ansible 2.8 workaround)
command:
cmd: "openssl ec -in {{ pulp_certs_dir }}/token_private_key.pem -pubout -out {{ pulp_certs_dir }}/token_public_key.pem"
creates: "{{ pulp_certs_dir }}/token_public_key.pem"
become: true
become_user: "{{ pulp_user }}"
when:
- ansible_version.major == 2
- ansible_version.minor < 9

when: pulp_install_api_service | bool
2 changes: 1 addition & 1 deletion roles/pulp_common/meta/main.yml
Expand Up @@ -5,7 +5,7 @@ galaxy_info:
issue_tracker_url: https://pulp.plan.io/projects/pulp/issues/new
license: GPL-2.0-or-later
company: Red Hat
min_ansible_version: 2.8
min_ansible_version: 2.9
platforms:
- name: Debian
versions:
Expand Down
2 changes: 1 addition & 1 deletion roles/pulp_content/meta/main.yml
Expand Up @@ -5,7 +5,7 @@ galaxy_info:
issue_tracker_url: https://pulp.plan.io/projects/pulp/issues/new
license: GPL-2.0-or-later
company: Red Hat
min_ansible_version: 2.8
min_ansible_version: 2.9
platforms:
- name: Debian
versions:
Expand Down
2 changes: 1 addition & 1 deletion roles/pulp_database/meta/main.yml
Expand Up @@ -5,7 +5,7 @@ galaxy_info:
issue_tracker_url: https://pulp.plan.io/projects/pulp/issues/new
license: GPL-2.0-or-later
company: Red Hat
min_ansible_version: 2.8
min_ansible_version: 2.9
platforms:
- name: Debian
versions:
Expand Down
2 changes: 1 addition & 1 deletion roles/pulp_database_config/meta/main.yml
Expand Up @@ -5,7 +5,7 @@ galaxy_info:
issue_tracker_url: https://pulp.plan.io/projects/pulp/issues/new
license: GPL-2.0-or-later
company: Red Hat
min_ansible_version: 2.8
min_ansible_version: 2.9
platforms:
- name: Debian
versions:
Expand Down
2 changes: 1 addition & 1 deletion roles/pulp_devel/meta/main.yml
Expand Up @@ -5,7 +5,7 @@ galaxy_info:
issue_tracker_url: https://pulp.plan.io/projects/pulp/issues/new
license: GPL-2.0-or-later
company: Red Hat
min_ansible_version: 2.8
min_ansible_version: 2.9
platforms:
- name: Debian
versions:
Expand Down
2 changes: 1 addition & 1 deletion roles/pulp_health_check/meta/main.yml
Expand Up @@ -5,7 +5,7 @@ galaxy_info:
issue_tracker_url: https://pulp.plan.io/projects/pulp/issues/new
license: GPL-2.0-or-later
company: Red Hat
min_ansible_version: 2.8
min_ansible_version: 2.9
platforms:
- name: Debian
versions:
Expand Down
2 changes: 1 addition & 1 deletion roles/pulp_redis/meta/main.yml
Expand Up @@ -5,7 +5,7 @@ galaxy_info:
issue_tracker_url: https://pulp.plan.io/projects/pulp/issues/new
license: GPL-2.0-or-later
company: Red Hat
min_ansible_version: 2.8
min_ansible_version: 2.9
platforms:
- name: Debian
versions:
Expand Down
2 changes: 1 addition & 1 deletion roles/pulp_resource_manager/meta/main.yml
Expand Up @@ -5,7 +5,7 @@ galaxy_info:
issue_tracker_url: https://pulp.plan.io/projects/pulp/issues/new
license: GPL-2.0-or-later
company: Red Hat
min_ansible_version: 2.8
min_ansible_version: 2.9
platforms:
- name: Debian
versions:
Expand Down
2 changes: 1 addition & 1 deletion roles/pulp_rpm_prerequisites/meta/main.yml
Expand Up @@ -5,7 +5,7 @@ galaxy_info:
company: Red Hat
issue_tracker_url: https://pulp.plan.io/projects/pulp_rpm/issues
license: GPL-2.0-or-later
min_ansible_version: 2.8
min_ansible_version: 2.9
#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
Expand Down
2 changes: 1 addition & 1 deletion roles/pulp_services/meta/main.yml
Expand Up @@ -5,7 +5,7 @@ galaxy_info:
issue_tracker_url: https://pulp.plan.io/projects/pulp/issues/new
license: GPL-2.0-or-later
company: Red Hat
min_ansible_version: 2.8
min_ansible_version: 2.9
platforms:
- name: Debian
versions:
Expand Down
4 changes: 3 additions & 1 deletion roles/pulp_webserver/meta/main.yml
Expand Up @@ -5,7 +5,7 @@ galaxy_info:
issue_tracker_url: https://pulp.plan.io/projects/pulp/issues/new
license: GPL-2.0-or-later
company: Red Hat
min_ansible_version: 2.8
min_ansible_version: 2.9
platforms:
- name: Debian
versions:
Expand All @@ -23,3 +23,5 @@ galaxy_info:
- pulpcore
dependencies:
- pulp_common
collections:
- ansible.posix
2 changes: 1 addition & 1 deletion roles/pulp_workers/meta/main.yml
Expand Up @@ -5,7 +5,7 @@ galaxy_info:
issue_tracker_url: https://pulp.plan.io/projects/pulp/issues/new
license: GPL-2.0-or-later
company: Red Hat
min_ansible_version: 2.8
min_ansible_version: 2.9
platforms:
- name: Debian
versions:
Expand Down
6 changes: 4 additions & 2 deletions tox.ini
@@ -1,5 +1,5 @@
[tox]
envlist = py{27,36,37,38}-ansible{2.9, 2.10}-{release, source, packages}-{static, dynamic, upgrade}
envlist = py{27,36,37,38,39}-ansible{2.9, 2.10, 3.0}-{release, source, packages}-{static, dynamic, upgrade}
# This repo isn't a Python project, so it makes no sense to install an sdist
# into the virtualenvs tox creates.
skipsdist = true
Expand All @@ -9,12 +9,14 @@ sitepackages = true
deps =
ansible2.9: ansible~=2.9.0
ansible2.10: ansible~=2.10.0
ansible-lint
ansible3: ansible~=3.0.0
ansible-lint[community,yamllint]
docker
molecule
py36: molecule-docker
py37: molecule-docker
py38: molecule-docker
py39: molecule-docker
# molecule dep that is incompatible with python 2 as of 1.13.0 & 1.13.1
sh < 1.13 ; python_version < "3"
setenv =
Expand Down

0 comments on commit 535c3aa

Please sign in to comment.