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
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
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
New version of openstackdocstheme (Victoria+) respects pygments_style.
Since this repo is using now Victoria (master) requirements but has
not branched for Ussuri yet, it uses the new version.
Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.
Change-Id: I65491a951bee4fbdc15206de98b35cd569508bd7
This change will allow config_template to parse list only files
and extend or replace the content of the list based on the
selected module options.
Change-Id: I2a24033b0323bcc25bd1b50ffb4034441ab2f468
Signed-off-by: Kevin Carter <kecarter@redhat.com>
The config_template comment parser will now respect all comments in
INI files, as they are written. This will ensure spacing, paragraphs,
and other comments bits that may be in an INI file remain intact,
even when overriding options and sections. With this feature we'll
now be able to insert options in OSLO config generated files without
truncating or making a mess of the file structure.
This is an internal enhancement and requires no change from the
operator or from within any ansible task. To ensure enhanced comments
are working, new tests have been added which will run though all of
the `config_template` INI file functions using a mock service file.
Existing tests for the old comment structure has been removed.
This includes tests that were running redundant tasks for file
diffs or expected the only style, merged, comment layout. All of the
tests have been broken out into descriptive task files. This was
largely done for readability. It was difficult to see what tests
we had and how I needed to extend them to test the enhanced comments
functionality given the INI type tests were all thoughout the
`tests/test-common-tasks.yml`. Now that the files have been broken
out developers will easily be able to audit our tests making it
simple to extend.
Change-Id: Ia6cdc215c35fa9ac45b718c211616a9887a74e37
Signed-off-by: Kevin Carter <kecarter@redhat.com>
The config template action plugin assumes that the local node is
supplying a configuration file that will be used to copy content
to a target node. This change gives the module the ability to
change configuration files on target nodes using all remote
sources. The new boolean option, `remote_src` has been added to
enable or disable this functionality. When enabled, the module
will retrieve content from the target node and load it as
"user_content". By pre-loading it in the user content the
module will function normally without any major structural
changes or performance impact.
Change-Id: Id9c7e16fb935c2da0b32b7cf53449f68bd1e9c89
Signed-off-by: Kevin Carter <kecarter@redhat.com>
Compare dict vars of before and after configuration to determine whether
the config keys or values have changed so a configuration file will not
be incorrectly marked as changed when only the ordering has changed.
Set diff return variable to a dict of changes applied.
Change-Id: Ie67119b1420936c8ed89f8338ea9dce4c47e185c
The default section in an ini file will always be 'DEFAULT', but for some
configuration files you may want to be able to set this to ensure
another section is at the top. 'global' for example, when working with
fio.
This PR adds the ability to set the section to be at the top, but will
default to 'DEFAULT' so no change will happen to existing tasks running
config_template.
Change-Id: Ifbc0b91aef46f3c2d98e73fdc9ab888244550bab
Gate tests will fail until we fix pep8 for config_template.py
This PR fixes the config_template module for pep8 compliance,
follows the latest PTI for docs compliance,
and re-enables the linters.
Change-Id: Ic288b462a53ac45983f47f29a7d5d8d48d0b9c0b
Co-Authored-By: Jean-Philippe Evrard <jean-philippe@evrard.me>
This plugin is no longer used and conflicts with Ansible 2.4. Master
has recently moved to Ansible 2.4 and placed all of the group_vars back
into the inventory path. Being that the plugin is no longer required
and results in a runtime warning[0] it's being removed.
[0] - http://paste.openstack.org/show/628674/
Change-Id: If91214dd2d2a36da82e5433a3a4a36c3946cbf4e
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
Release notes are version independent, so remove version/release
values. We've found that projects now require the service package
to be installed in order to build release notes, and this is entirely
due to the current convention of pulling in the version information.
Release notes should not need installation in order to build, so this
unnecessary version setting needs to be removed.
This is needed for new release notes publishing, see
I56909152975f731a9d2c21b2825b972195e48ee8 and the discussion starting
at
http://lists.openstack.org/pipermail/openstack-dev/2017-November/124480.html
.
Change-Id: I1694a1b7da68e29e83e2931d40befc1683719c2c
This patch implements an initial set of jobs intended to match
the current job execution method. It does not intend to improve
how the jobs are executed - only to replicate what is currently
in openstack-infra/openstack-zuul-jobs and provide the platform
to iterate on.
Change-Id: Id5a41c4f09bfc63b373e83493dd85a53850bd71c
When accessing nested facts, such as in ansible_local sections, guard
statements in the when clause can get quite long, due to having to
repeate the 'in/not in' logic for every key at every level.
The get_nested filter attempts to instead to move the guard into a
single line, making the conditions easier to write and maintain.
As example,
('openstack_ansible' not in ansible_local or
'swift' not in ansible_local['openstack_ansible'] or
'venv_tag' not in ansible_local['openstack_ansible']['swift'] or
ansible_local['openstack_ansible']['swift']['venv_tag'] == swift_venv_tag)
could be rewritten as
get_nested(ansible_local, 'openstack_ansible.swift.venv_tag') == swift_venv_tag
Change-Id: I3b43c25c8783c43cf5285f2b3e7267b2c5712ea0
It is sometimes useful to tell ConfigTemplateParser to write
out options that are valueless and not suffixed with '=' or ':',
such as when overriding a my.cnf.
This commit adds the 'ignore_none_type' attribute to the config_template
module. If this attribute is set to false, then valueless options will be
written out to the resultant INI file as-is, without the '=' or ':' suffix.
Change-Id: I5c88b2019c01b44193a5d0df9299ecce6de52f01
Partial-Bug: #1693234
As part of the docs migration work[0] for Pike we need to switch to use the
openstackdocstheme.
[0]https://review.openstack.org/#/c/472275/
Change-Id: I66ea11e32ec9736e2376027863723c19c07a32fb
As of Ansible 2.3, the os_network module now allows more additional
options for 'provider_network_type'[0]. Use of OSA's neutron plugin can
be removed.
[0] https://github.com/ansible/ansible-modules-core/issues/5589
Change-Id: If74185ecca1ea639c2e1526b5542e89dd533084b
Implements: blueprint use-std-ansible-modules
This opens the door to using group_vars and host_vars in
userspace, by allowing the user to define a ":" delimited list
of folder that will then be used by a vars_plugin, and (maybe
later) by the inventory.
This can't override group_vars due to ansible precedence.
We could technically have this override done by moving the
group_vars into a different folder and adding it to these
environment variables.
Change-Id: Id22e82b01b08885a1c7b516818ca07e75f6d558f
There is no usecase for having 2 endpoints that have the same Region,
interface, service_name and service_type.
The keystone module should default to update these endpoints if the url
is different, but the Region, interface, service_name and service_type
match.
This will make the default behaviour of state "present" to match that of
state "update".
Change-Id: I0ade538e20f2a926b33c1637446c2d4f650cd13d
This change adds the new attribute
``sriov_host_interface`` in order to map ml2 network
names to physical SR-IOV capable network interfaces.
Co-Authored-By: James Denton <james.denton@rackspace.com>
Change-Id: Ia62725e2369f75000157e0ab2c3f858e61fef10d
Closes-Bug: #1653283
With the use of this library replaced by upstream Ansible modules it's
no longer necessary to carry it.
Closes-Bug: 1538642
Change-Id: I55591132180eec99ce9b9bc38caa996b01d18949
Depends-On: Ic98613c37069ccb2ec1bc9a7644c922cc5b37e22
Depends-On: I017303e9a731ebc60315ea1784ba184a8294b08e
Depends-On: If0e36c61307056c8786c67b60fd56b03f2ad7bda
With the use of this library replaced by upstream Ansible modules it's
no longer necessary to carry it.
Change-Id: Iedc9c18a457eb2b620538c693337860b80a85123
Depends-On: I8c165531407c6b6aa8e5910cb28ae610b53e2ee5
get_networks will return network information, and will fail if the
specified "net_name" network is not present.
If no "net_name" is specified the network information will be
returned without performing the check on the existence of "net_name"
network within neutron.
Change-Id: I01775c9b29e312cc6696ffdc708befc46d11bf52
Releasenote translation publishing is being prepared. 'locale_dirs'
needs to be defined in conf.py to generate translated version of the
release notes.
Note that this repository might not get translated release notes - or
no translations at all - but we add the entry here nevertheless to
prepare for it.
Change-Id: I22dc695c28fe800a16f0ec14f6cbeb4d16319192
By default a list item in a JSON or YAML format will extend if a its already
defined in the target template and a config_override using a list is being set
for the existing "key".
This change allows that functionality to be toggled on or off. The boolean
option to enable list extension is ``list_extend``.
To maintain the API this feature will remain True by default.
Co-Authored-By: Travis Truman <travis_truman@cable.comcast.com>
Change-Id: I97e06aef2cc778f048f3d6863fe61d10eddb8602
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This change is creating an opportunistic Ansible execution strategy and
an update the ssh connection plugin so that it supports direct access to lxc
containers within ever having to ssh into them.
The intention of this change is to speed up execution time and reliability by
tuning the execution environment within Ansible to run faster while also attempting
to subvert transient ssh issues.
Change-Id: Ide34513bf82523257bdd2a8a68dff165f9927c56
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This change ensures that the dependency file ordering
for requirements file is kept intact for all fot the discovered
file used to build the repo environment.
Change-Id: I36d2044965c8a0809a417083c3f24c406b5a36c9
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
The config template release note has a stand alone 'fixes' note which,
when rendered, makes no sense as it stands alone. As the bug is
clearly attached to the milestone it is unnecessary to mention the
bug fixed so that line has been removed.
Change-Id: Ia40e2e08be4d384eb3e5992502daaebe3d338d32
This change adds the MultiStrOps variaable type to the config
template parsing as well as supports multi string options when
passing configuration overrides.
This is made prossible by using the set type for options found within
config overrides and creating a custom dictionary class that allows
for multiple keys to be stored as a set. When the config_template
encounters a set type it will process and reder value as a
MultiStrOps.
Set types are defined in yaml via the "?" entry.
Example Overrides:
things:
- 1
- 2
multistrops_things:
? a
? b
Example Rendered Config:
things = 1,2
multistrops_things = a
multistrops_things = b
Change-Id: I2193ea2eb7f839c3151c2c96f9dfe86f141e5a15
Closes-Bug: #1542513
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>