Commit Graph

73 Commits (main)

Author SHA1 Message Date
Andrew Schoen d30a99c350 validate: add support for containerized_deployment
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2018-05-18 17:58:24 +02:00
Andrew Schoen 5d64eb79c1 validate: show an error and stop the playbook when notario is missing
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2018-05-18 17:58:24 +02:00
Andrew Schoen 91f65e2420 validate: improve error messages when config fails validation
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2018-05-18 17:58:24 +02:00
Andrew Schoen 760a1afc21 validate: only validate osd config options on osd hosts
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2018-05-18 17:58:24 +02:00
Andrew Schoen 4325ccc857 validate: only check mon and rgw config if the node is in those groups
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2018-05-18 17:58:24 +02:00
Andrew Schoen 48c2a4fda8 validate: check rados config options
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2018-05-18 17:58:24 +02:00
Andrew Schoen 377fe81c10 validate: make sure ceph_stable_release is set to the correct value
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2018-05-18 17:58:24 +02:00
Andrew Schoen 692ab26734 validate: validate osd_scenarios
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2018-05-18 17:58:24 +02:00
Andrew Schoen 4baa8389e0 validate: check monitor options
validates monitor_address, monitor_address_block and monitor_interface

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2018-05-18 17:58:24 +02:00
Andrew Schoen 9f68dad2ff validate: first pass at validating the install options
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2018-05-18 17:58:24 +02:00
Alfredo Deza 36dc7c7862 plugins create an action plugin for validation using notario
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2018-05-18 17:58:24 +02:00
Sébastien Han 62ec33d1e5 config_template: resync with upstream
Signed-off-by: Sébastien Han <seb@redhat.com>
2018-04-23 10:17:24 +02:00
Andy McCrae 8e38675168 Add support for --diff in config_template
Add support for the Ansible --diff mode in config_template. This will
show the before/after for config_template changes, in the same way as
the base copy and template modules do.

To utilise this run your playbooks with "--diff --check".
2018-04-18 17:19:13 +02:00
Andy McCrae fe4ba9d135 Fix config_template to consistently order sections
In ec042219e6 we added OrderedDict and
sorted to be able to preserve order for config_template k,v pairs inside
a section.

This patch adds a similar ordering for the sections themselves, which
could still change order and intiiate handler restarts.

OrderedDict isn't needed because we use .items() to return a list that
can then be sorted().
2018-03-16 23:24:28 +01:00
Andy McCrae 60d4b75f51 Cleanup plugins directories and references
Having callback_plugins, and action plugins in random locations causes
a lot of disparity.

We should centralize this into one place in the plugins directory and
fix up the ansible.cfg to reflect this.

Additionally, since the ansible.cfg already reflects action_plugins, we
don't need a link to action_plugins in the base of the repository.
2018-03-14 11:15:39 +01:00
Guillaume Abrioux ec042219e6 ceph-defaults: fix handlers that are always triggered
Handlers are always triggered in ceph-ansible because ceph.conf file is
generated with a randomly order for the different keys/values pairs
in sections.

In python, a dict is not sorted. It means in our case each time we try
to generate the ceph.conf file it will be rendered with a random order
since the mecanism behind consist of rendering a file from a python dict
with keys/values. Therefore, as a quick workaround, forcing this dict to be
sorted before rendering the configuration file will ensure that it will be
rendered always the same way.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-10-13 16:15:27 +02:00
Alberto Murillo Silva d16a6b47f0 sync config_template plugin with master branch
ansible 2.2 deprecates first_available_file option which is used in
the config_template module by 'generate ceph configuration file' task.

This change syncs the config_module files from their master repository
in github.com/openstack/openstack/ansible-plugins which includes the fix

2f6cac2cf6

Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com>
2016-11-08 10:12:16 -06:00
Kevin Carter 7da0c7913b
Updated config_template for 2.2 compat
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-10-25 10:38:09 -05:00
Kevin Carter 2aa894167a
Added option to support case-insensitive keys
This change allows keys in INI format to be any case.
The default ConfigParse module sets this to be lower
however in some cases keys are needed to be upper and/or
mixed.

Change-Id: I4e0dedb1b73ee596929bd425af6b0aaefd3a6c27
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit f946160dd0)
2016-07-25 16:39:23 -05:00
Kevin Carter b56b224250
Update the config_template plugin
These changes address 2 issues:

* The config template plugin in v1 mode was not respecting a list
  of integers and would cause a stacktrace because the ConfigParese
  module expects everything written to be a string.
* The config template plugin in v2 mode was not properly handingly
  the multi-string-op type due to an oversight in the ``_option_write``
  method.

With these updates the config template is now able to better support
all of the potential options that could be thrown at it when writing
an INI config file.

Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-04-11 23:28:40 -05:00
Kevin Carter 6dea2e2f89
Update the config_template plugin for ansible2
This change updates the config_template plugin to load
the version of the config_template needed based on the
detected version of ansible running. Note, Once the
upstream change merges for ansible 2 [0] we should
drop the ansible 2  version of this plugin.

[0] - https://github.com/ansible/ansible/pull/12555

Change-Id: Ifbdde0f30ee2bd8025ede07c86234527ba9891db
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-03-30 17:23:09 -05:00
Sébastien Han 64b32020e9 Necessary change to work on ansible v2
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-01-25 11:21:30 +01:00
Sébastien Han 4407967de0 Using config_template
Thanks to @cloudnull great patch at
https://github.com/ansible/ansible/pull/12555
we now have the ability to add more configuration options instead of
having to push a PR to add a new option to the template. So you can
dynamically add and remove flags.

To use it, edit `ceph_conf_overrides` in `group_vars/all` like so:

```
ceph_conf_overrides
 global:
     foo: 12345
     bar: 6789
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2015-12-16 17:19:50 +01:00