* Update ansible-role-redhat-subscription from branch 'master'
to 340d059ee56f462fb96c52df7761f9d5c98ae66b
- Retire Tripleo: remove repo content
TripleO project is retiring
- https://review.opendev.org/c/openstack/governance/+/905145
this commit remove the content of this project repo
Change-Id: I6b367027aff77f4bf9810903e62ccb59bca0ff38
* Update ansible-role-redhat-subscription from branch 'master'
to eefe5019238a7b88bda0a9df1a6d9b02267e4902
- Update rhsm_disable_container_check default value
Following [1], the right way to disable the feature is to set the env
var value to an empty string.
Until now, whatever the value was (even False), it was enabled, because
the var was in the env.
[1] https://github.com/candlepin/subscription-manager/pull/3097
Change-Id: I54e1452dc4bb6e2e25fa9567335b62b730000e83
* Update ansible-role-redhat-subscription from branch 'master'
to f703e5c494752e3a0e05aa02cd284b591a0d7959
- Add missing environment for a couple of tasks
If564089fb1cb77366fa6d6f8e4086691a4dfcf37 introduced a new parameter,
allowing to disable container validation by setting the
SMDEV_CONTAINER_OFF environment variable.
A couple of places were overlooked, leading to issues, especially in a
satellite-6 enabled environment.
Resolves: rhbz#2102906
Change-Id: I04b6e8ed0c265021697ed574c55fc8b21eb66395
* Update ansible-role-redhat-subscription from branch 'master'
to 9d1a91821a2955df4875c3e876b7426b264d9bc7
- Add trailing slash to status URI
Apparently, pulp redirects /status to /status/. Adding the trailing
slash here allows to avoid a useless redirect, and may help avoiding
issues with Satellite not answering on due time, or other hard to debug
situations.
Change-Id: I32d4944d78e3fc2714243129906937e74be4465f
* Update ansible-role-redhat-subscription from branch 'master'
to 4646e4e3d2ec792d657ce8cff22a9731e29e272e
- Retry polling the satellite endpoint on failure
Retry polling the satellite endpoint when determining which
satellite version is running as it looks like, sometimes, in
given circumstances, those calls will fail and make deployment
fail later on with the following error:
```
The error was: 'dict object' has no attribute 'status'
```
Change-Id: I4bf68f89c15c0fc25e0ec615e2370292ddc7db64
Depends-on: https://review.opendev.org/c/openstack/ansible-role-redhat-subscription/+/839993
* Update ansible-role-redhat-subscription from branch 'master'
to 41b5d0b7bea228299167684adb87d5966e414909
- Update the satellite task file for version checks
This change updates the satellite version check task file so that we're
able to perform version checks and set our required facts without
running into undefined values in certain circumstances.
Updates have also been made throughout the task file to ensure all jinja
strings are quoted, all data types are set correctly so there's no
assumed conversion, and all conditions follow a list format.
The Satellite 6.10 checks have been added to a conditional block, this was
done so we're not accidently setting facts incorrectly while also
reducing task execution.
> Updates have been made to our tox setup for ansible-lint. This is done
because our current lint test was broken; ansible lint will now test
with ansible-core.
rhbz: 2061393
Signed-off-by: Kevin Carter <kecarter@redhat.com>
Change-Id: Ibb17c000a7337c2c344b9ff08ce9fe75897838e9
* Update ansible-role-redhat-subscription from branch 'master'
to da50e0e267297d5d0e1e7269038cf360af5cd96e
- Fix Ansible Lint
Ansible lint is currently broken for this role. This change updates to
Ansible Core for the dependencies and then adjusts the role files to
ensure that the role can pass lint checks.
Change-Id: Id19209ca0a939bd669b25f9aad7dd5b011e34922
Signed-off-by: Kevin Carter <kecarter@redhat.com>
* Update ansible-role-redhat-subscription from branch 'master'
to 0f7ac2a5536e6eefc2d7b2f0b324d8e97a4193ee
- Adding option to disable container validation
subscription-manager will fail if run from within a container. Since
some nodes are bindmounting /run, a .containerenv file is exposed
inside /run on the hosts and this breaks subscription-manager on
overcloud nodes.
We can bypass this validation from subscription-manager by enabling the
SMDEV_CONTAINER_OFF environment boolean as described here [1].
We need to give the hability to operators to bypass this check as well
on all subscription-manager calls.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=2058540
[1] https://github.com/candlepin/subscription-manager/pull/2652/files
Change-Id: If564089fb1cb77366fa6d6f8e4086691a4dfcf37
* Update ansible-role-redhat-subscription from branch 'master'
to ae0a36118ad113e808c832e6ea98d435b0d08d71
- Revert "addressing https://github.com/ansible-collections/community.general/issues/715"
This reverts commit 66a322b0075f57e88bccf79ae3a87eede7a72236.
Reason for revert: this needs more work from the author. We agreed on this.
Change-Id: I905598df2379ff2b810d4d9b4032e4eadb873db0
* Update ansible-role-redhat-subscription from branch 'master'
to 31b0c74d1e6f40c6d4fe2479190f21474e99d9df
- Fix URL version for Satellite 6.10
Pulp has been migrated from Pulp2 to Pulp3 in Satellite 6.10,
removing the /pulp/api/v2/status url, new URL is /pulp/api/v3/status
Resolves: RHBZ#2024440
Change-Id: I4fbb25634795b9d13a28c417f918da5e58ad2321
* Update ansible-role-redhat-subscription from branch 'master'
to effac4c9d8b93cd7d8403275676cae015f30a0da
- Correct the tox option for skipping sdist generation
The tox option to skip source distribution building is skipsdist,
but this seems to be often misspelled skipdist instead, which gets
silently ignored and so does not take effect. Correct it
everywhere, in hopes that new projects will finally stop copying
this mistake around.
See https://tox.readthedocs.io/en/latest/config.html#conf-skipsdist
and https://github.com/tox-dev/tox/issues/1388 for details.
Change-Id: I1c5eaf99582fa0f09a42a1143d6ca8d0bb9e7289
* Update ansible-role-redhat-subscription from branch 'master'
to 17a8bd5a8d61c50ac3ba1179d433cad2d2922b8f
- Merge "setup.cfg: Replace dashes with underscores"
- setup.cfg: Replace dashes with underscores
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:
UserWarning: Usage of dash-separated 'description-file' will not be
supported in future versions. Please use the underscore name
'description_file' instead
[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb
Change-Id: Ib373c4b44b0ee5a80752081b1883433eb9045765
* Update ansible-role-redhat-subscription from branch 'master'
to 4178cf561b90ceed29977b3bf9a4ffe75423b60d
- Fix service fact reference
Update the reference to use ansible_facts.
Change-Id: I5477f4e85f5bf7f84b9c9dc7a9d043972615a019
Related-Bug: #1915761
* Update ansible-role-redhat-subscription from branch 'master'
to 7400e5a9d972a6e2854113cdadc66836547718ee
- Use ansible_facts
ansible_pkg_mgr requires that the facts be injected as vars. We should
use ansible_facts instead.
Change-Id: I84ae549b549363d32207dff324657dd7df1f5ac0
* Update ansible-role-redhat-subscription from branch 'master'
to c6f9a7bdd75d03c728dc8b08bbf6a695825eafda
- Fix CI
Cap ansible at <2.10 and fix hacking. Additionally convert ansible-lint
to not use the old shell script and use .ansible-lint for skips
Change-Id: I035ed9f3964ba904dc9ccfe048b69a68c6680253
* Update ansible-role-redhat-subscription from branch 'master'
- Replace deprecated UPPER_CONSTRAINTS_FILE variable
UPPER_CONSTRAINTS_FILE is deprecated and TOX_CONSTRAINTS_FILE is
the new environment variable name that replaces it [1].
This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.
[1] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file
[2] https://review.opendev.org/#/c/722814/
Change-Id: I419f5d78981ac9c67617202fb9c31e6ddc4ed9d7
* Update ansible-role-redhat-subscription from branch 'master'
- Bump pyflakes, exclude ansible-lint 106
We need a python 3.9 compatible version of pyflakes and exclude the role
name ansible-lint rule.
Related PyCQA/pyflakes #367
Change-Id: I44702be1aa668c381da2c54338c72f1d8e33562b
* Update ansible-role-redhat-subscription from branch 'master'
- Add support for "Simplified Content Access"
When Simplified Content Access is enabled for a subscription,
the portal can be used with an activation key AND repositories.
So this patch adds a new parameter, rhsm_simplified_content_access
(False by default for backward compatibility).
When set to True, we'll allow the "Configure repository subscriptions"
task to be run without any warning since both the rhsm_repos and
rhsm_activation_key usually mutually exclusive, now work together when
simplified content access is enabled.
Change-Id: I4ffa344956572ebcd5a432fe41b86eb682f8d2a3
* Update ansible-role-redhat-subscription from branch 'master'
- Adjustments to detect Satellite version/mode
1) Fail if we couldn't figure out what version of Satellite is running.
Otherwise we end up including a playbook that doesn't exist and the
error is misleading.
2) Change the Satellite 6 version check, to use /pulp/api/v2/status
instead of /katello/api/ping; which seems to work better when a
Capsule is used. This URL should work for both Satellite 6 and
Capsule.
3) Document that rhsm_rhsm_port needs to be changed to 8443 if a capsule
is used.
Change-Id: Ibc7c05260f01adf520f5d18f3ea8e23e266e4f6d
* Update ansible-role-redhat-subscription from branch 'master'
- Introduce rhsm_release parameter
So we can configure a specific release when subscribing the node.
It has been reported on https://bugzilla.redhat.com/show_bug.cgi?id=1839063
that setting a release was required to get rpms from
rhel-8-for-x86_64-baseos-eus-rpms repository when installing OpenStack
on RHEL8.
Change-Id: I30d93806a7305e101c25507fb87bd02af62b61a5
* Update ansible-role-redhat-subscription from branch 'master'
- Skip proxy tasks when not needed
if rhsm_rhsm_proxy_hostname is not defined, we don't need to run the
tasks used to configure proxy bits.
Change-Id: I15b70179ced343a1abbbb3ca8bd24fed50bfd758
* Update ansible-role-redhat-subscription from branch 'master'
- Fix ansible_pkg_mgr
ansible_pkg_mgr isn't in facts apparently, it's available from ansible
vars directly.
Change-Id: I21462446aeb01bbd280ee9c0cf9ef2bb222425b0
* Update ansible-role-redhat-subscription from branch 'master'
- Improve support for HTTP proxy
- Configure the package manager (yum or dnf) to support the proxy
parameter.
- Pass the proxy parameters when using redhat_subscription module.
- Adding rhsm_rhsm_proxy_proto to not hardcode http in the proxy
url.
rhbz#1816255
Change-Id: I64b2dc97c512cecb7f4e6bcfa283733b3f2c1dc8
* Update ansible-role-redhat-subscription from branch 'master'
- Fix issue with long description by using markdown format
Tell to pypi to convert long_description to markdown format.
https://github.com/pypa/warehouse/issues/5890#issuecomment-494868157
Change-Id: Id74d08c36b421f1b11f7cfeece1a77306ec138c0
* Update ansible-role-redhat-subscription from branch 'master'
- register: add retry mechanism
Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1715958
A regression in Satellite added a delay to the registration to happen.
To counter this problem we retry 5 times with a delay of 10 seconds between
retries.
Change-Id: Iaa578d608f64612b20deefe7b2ea1006b041654d
Closes-Bug: #1834242
* Update ansible-role-redhat-subscription from branch 'master'
- Rename rhsm_repository module to avoid conflict.
The rhsm_repository is now part of the Ansible installation,
however, the version used inside the redhat_subscription role
contains changes the defaul module from Ansible doesn't contain.
As a consequence, if in the playbook execution, some task makes
use of the rhsm_repository module Ansible will locate it inside
its default module libraries and when we get to the point of invoking
the module from ansible-role-redhat-subscription/tasks/portal.yml
it will find out that the module is already loaded and make use
of the Ansible one, instead of the module stored under library/
rhsm_repository.py. This is a temporary solution until we'll update
into Ansible 2.8 for queens and rocky, then both modules will be
in sync and the one from ansible-role-redhat-subscription/library
could be removed.
Change-Id: Id53ebefff1f992781171a1e760fbf5306020cb56
Closes-Bug: #1833519
* Update ansible-role-redhat-subscription from branch 'master'
- sat6: install katello-host-tools after registration
Context on https://bugzilla.redhat.com/show_bug.cgi?id=1717093 but with
Satellite 6.5, we now require this rpm to be deployed right after the
registration and repos setup otherwise the registration is in failure.
Change-Id: I14aa7eaec1c9abad6de83ddff092e2ad224075c2
* Update ansible-role-redhat-subscription from branch 'master'
- Update min tox version to 2.0
The commands used by constraints need at least tox 2.0. Update to
reflect reality, which should help with local running of constraints
targets.
Change-Id: Iecc9b044469c970fa86bf3dab35a1d10c7c12429
* Update ansible-role-redhat-subscription from branch 'master'
- Update to opendev
Change-Id: I486a98640122837aeb7048db8a7e5024eff72654
- OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:
http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.htmlhttp://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html
Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
* Update ansible-role-redhat-subscription from branch 'master'
- unregister: run with become
The command needs to be run as root, I missed it in the last patch.
Change-Id: I2f5160beda1dfa5bf1fa3d82d18095bf03de8d86
* Update ansible-role-redhat-subscription from branch 'master'
- unregister: use command to remove the subscription
The RHSM module is broken when unregistering:
https://github.com/ansible/ansible/pull/55468
The new command to unregister is 'remove':
$ subscription-manager -h
remove Remove all or specific subscriptions from this system
unsubscribe Deprecated, see remove
And also requires one of --serial, --pool or --all.
$ subscription-manager remove
Error: This command requires that you specify one of --serial, --pool or --all.
Change-Id: I439130e289bc039d718781c43f0fdfef1c31b8be
* Update ansible-role-redhat-subscription from branch 'master'
- Simplify & document unregister
1) Simplify the unregister task, which doesn't require any parameter,
easier to maintain and less error prone.
2) Document with a playbook example in README how to unregister.
3) Remove useless register, never used later.
Change-Id: Ic1b6674c4608b555f51aa8c6716630c8d96b7fe2
* Update ansible-role-redhat-subscription from branch 'master'
- Merge "Fix lint and zuul: add publish-to-pypi"
- Fix lint and zuul: add publish-to-pypi
so we can release it.
Change-Id: Ia85c152c50f0330fa8ad4e3cb1acf5eeb1cdb6b1