When building releasenotes (with 'tox -e releasenotes') the job fails
with the following error:
WARNING: Invalid configuration value found: 'language = None'. Update
your configuration to a valid language code. Falling back to 'en'
(English).
This caused publish-openstack-releasenotes-python3 post release job
failure as well. By removing the explicit set of language of None makes
the sphinx warning disappear.
Change-Id: I2482824f78901e14781bde49674bde4a9fd431ec
This reverts commit d90989ef87.
Reason for revert: This job requires secret that can not be shared the way it is
originally supposed. So we should find other way around to publish collection to the galaxy.
Change-Id: I748bc0d2e476148c38f8305f15fd6e573eb7d008
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: I74130dab437c7ec7333d19bf2efc6f9b6095a0ff
At the moment we do resolve template 2 times for some historical reasons
This leads to {% raw %} tag as well as any other content be not respected
on the second renderring, since after the first one these tags
are gone, so no escaping or whatsoever work.
At the same time there're no obvious reasons to render second time,
since all override content is being renderred already. So there should
not be anything left that indeed needs this second run.
Change-Id: I414b1b3b4e426316707dda23b9aeff6b6f4f7c2f
Closes-Bug: #1649381
In case template contains some Jinja content that we don't want to
resolve, there're not much options due to the bug, that ignores
{% raw %} tags. The other way to work it around is to override tags that
Jinja will use to detect the content it needs to render. This way
content that should be renderred can be placed in the same template
with the one that needs to stay intact.
Change-Id: I4d28f5ab03858f5555f5e9e555da1dddc0f2b016
Related-Bug: #1649381
This option was deprecated in favor of the allowlist_externals option
and does no longer work in recent tox.
Change-Id: I1cbf545c382fdb4dda837699392e59061ccf8f75
config_template historically was published on PyPi during times before
collections were a thing. This was one of the installations methods
that is not relevant or preffered since collections are here.
That patch aims to update documentation about ways of plugin
installation as well as adding deprecation notice of PyPi.
In the futher releases we will drop publishing on PyPi.
Change-Id: Ie1cd7b305b4d82fd0fbf4568ef20ff3d0236c049
We try to re-use ansible-colelctions-openstack CI job [1] for
publishing config_template collection.
[1] 86b573883a/.zuul.yaml (L352-L373)
Change-Id: Ib0ba55190864bbb5544ae4ef58aea588d9f53d24
The existing examples from code are not sufficient to explain
how the various features of the module can be used. This patch
hopes to add more practical examples to show some of the
features.
Hopefully this also sets a trend so that more examples are added
in the future.
Change-Id: I035ce06a2391904724aaf8b0a724d7b4fa8e27f0
With ansible 2.12 they started using CSafeDumper instead of
SafeDumper which ignores indent in yaml files.
To preserver behaviour and config formats we fallback to original
behaviour with indenting.
For that we adjust parenting of AnsibleDumper and adding SafeDumper
when it's not present there.
[1] bfd93c835a/lib/ansible/module_utils/common/yaml.py (L30)
Change-Id: Iadddef84eae31fab9478ad02220ae49d1c91fa4c
In order to pass functional tests on newer ansible we need to replace
dropped inlcude with proper import_playbook module.
Change-Id: I2bf9ca6003b66d5f7b8be9d7b54e12cb9b56f3c6
This prevents setuptools 61.0.0 doing autodiscovery and failing
as this is an ansible role, not a python module.
Change-Id: I5ef8a23aed6193bc61e52f0b069a835d229597d5
The following commit copy implemented by ceph-ansible [1] code quality
issues detected by DeepSource:
- Use literals instead of function calls to create data structure.
- Refactor useless else block in the loop.
[1] a0bc5afe26 (diff-ee824655f36c314a50f7dfe3f4c5ed7b41d4168ce17ec243139c6913192c6d66)
Change-Id: Ied7219f215cbbd7c2eb131234d59992a68f59e81
Unlike to the modules, ansible-galaxy tool does not respect symlinks,
which results in collection brokeness after it installation as plugin
itself is just missing there.
In the meanwhile, symlinks are respected by regular git clone which
is used for regular module retrievment.
Change-Id: I747b217e6b0706c05e5fae98bc5b89be3cbb5930
We create symlink and galaxy.yml file so that this module
could be installed as an ansible collection in addition
to already used methods.
Change-Id: I2f49028fbea09a2f38b54544ae96dee9d0156f6f
All references to Gentoo, SUSE, Debian stretch and Centos-7 are removed.
Conditional tasks, ternary operators and variables are simplified where possible
OS specific variables files are generalised where possible
Change-Id: I705b1ea8907a12d30a05a7b3ebbbfb7a8a021325
Use localhost and container1 as proper targets for the test playbook
rather than a combination of import_tasks/delegate_to for container1.
The previous code did not run the imported tasks against container1,
but instead a second time against localhost. This makes the handlers
checking the output from ansible diff fail as on the second run
against localhost there are no changes, giving an empty diff.
Changing the test play targets to localhost:container1 makes it more
obvious that the whole test playbook should be run against the host
and the container. It is not clear from the old code if the original
intent was to specifically test config_template tasks delegated from
the host to a container.
Change-Id: Ibc72868d9957567fe86a9d3205a80ec33441baff
In cases, when key already exist, but commented out without space
(ie "#key) and is not in default section, it's not updated with
sectdict.insert statement. That is possible happens because
self._sections keys are protected and can't be overwritten (at least
new assignment makes no difference)
Change-Id: Ie0c588a2d559bd38c68b3d018e547a036d83214c
Closes-Bug: #1889547
This change will ensure the config_template module is able to pull the appropriate
remote use when creating a temp file or directory.
Related-Bug: #1884816
Change-Id: I36b13db4d0b722e7c6c7244ab142003193a56ffe
Signed-off-by: Kevin Carter <kecarter@redhat.com>
There was no coverage of an actual OSA deployment in CI, so we
add this. Also remove the legacy python3 functional test
and move all tox environments to be python3.
Change-Id: I36cee01b9a14adf1840d35c3a8934de8a994f399
This aims to resolve deprecation warning: set_available_variables is
being deprecated. Use "@available_variables.setter" instead
Change-Id: I95191ad596656051bd6a2ba8dd720823ea3434ec