New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancements to the cobbler inventory script #25926
Conversation
The test
|
cc/ @alikins |
Any comments here? I've got some further enhancements - handling sub-profiles as sub-groups, which required shifting to the newer json format of output using 'hosts' and 'children'. |
@opoplawski sorry for not getting back sooner on this. It's no longer mergable, curious if you'd want to migrate this to an inventory plugin instead? |
ansible#69044)" This reverts commit 70b4ce5.
The module requires updates to work with the current Azure API.
(cherry picked from commit 96f504c) Co-authored-by: Brian Coca <brian.coca+git@gmail.com>
Since Ansible 2.9.8, if the fileglob plugin is passed a path containing a subdirectory of a non-existent directory, it will fail. For example: lookup('fileglob', '/'): ok lookup('fileglob', '/foo'): (non-existent): ok lookup('fileglob', '/foo/bar'): (non-existent): FAIL The exact error depends on Python 2 or 3, but here is the error on Python 2: AttributeError: 'NoneType' object has no attribute 'endswith' And on Python 3: TypeError: expected str, bytes or os.PathLike object, not NoneType This change fixes the issue by skipping paths that are falsey before passing them to os.path.join(). Fixes: ansible#69450
(cherry picked from commit 0d379d4)
…9645) * [stable-2.9] Pin Docker version at 19.03.1 (cherry picked from commit fe941a4) Co-authored-by: Sam Doran <sdoran@redhat.com> * [stable-2.9] Pin docker-ce-cli version in tests (ansible#69620) Installing docker-ce has a dependency of docker-ce-cli. If the version of docker-ci-cli is not specified, it installs the latest version. (cherry picked from commit 889da81)
anp, epg are required arguments for module. fatal error occurs when not specified: "FAILED! => {"changed": false, "msg": "missing required arguments: anp, epg"}"
- Add exclude_profiles option - Python 3 support - Better cache handling - --debug option - Remove --ignore-settings option - Remove environment variable handling - Create parent profile groups
This has been rebased against stable-2.9, mainly just so others can see my latest version of the script. |
@opoplawski This PR was evaluated as a potentially problematic PR for the following reasons:
Such PR can only be merged by human. Contact a Core team member to review this PR on IRC: |
@opoplawski seems like it was a bad rebase? There are quite a few conflicting files in odd places. |
It was rebased against release-2.9 instead of master. It appears impossible to change the target branch of the PR. I suppose I could close and open one against that if possible. Or figure out where the script lives now if anywhere.. |
Yeah I'd close and re-create, this would not be back-ported to 2.9. Scripts are overall getting deprecated in favor of inventory plugins which work much better. You may want to look at converting it and publishing it via a collection instead. |
Closing, since inventory scripts are no longer in the The cobbler inventory script has been moved to the community.general collection [1], although as @jimi-c points out, it would be better to provide an inventory plugin instead of continuing to work on the inventory script. [1] https://github.com/ansible-collections/community.general/blob/master/scripts/inventory/cobbler.py |
Converted to inventory plugin: |
SUMMARY
This makes a couple minor and one major change to the cobbler inventory script:
ISSUE TYPE
COMPONENT NAME
cobbler inventory
ADDITIONAL INFORMATION