42cec916dc5ea5d8c8203e74a26bf15b2e27465f
Commit Graph

9 Commits

Author SHA1 Message Date
Jimmy McCrory
35c3f3b73e Use listen instead of chained notifiers
From Ansible 2.2 onwards, listen can be used for
handlers instead of chaining notifiers. The
handlers are then executed in the sequence
present in the handler file.
Change-Id: I82dcb2fb8e38fcceca224f39fe18710a50e2090f
2018年03月17日 14:13:00 -07:00
Jenkins
92c226ba7f Merge "Ensure that policy file has correct group/mode" 2017年05月24日 23:37:58 +00:00
Jesse Pretorius
32ec0260d2 Use command instead of debug for handlers
Due to the debug message plugin the handler restart
messages show at the end of the playbook execution
which is a little confusing. Using debug also
requires setting changed_when to true which is a
little extra bit of code which we do not have to
carry.
Instead we use the command module which is simple,
works and less wordy.
Change-Id: I3562ef542ab4c87cd6bac82d916e5696149c8a6b
2017年05月24日 11:34:14 +01:00
Jesse Pretorius
ffd26a061b Ensure that policy file has correct group/mode
When the policy file is copied from the templated
file to the active file, it loses its group/mode
settings. This patch ensures that they are properly
replicated during the copy.
Change-Id: I3fdd5d0122dec93a95c47b1f473b74eba11d6f26
2017年05月23日 23:44:15 +01:00
Jesse Pretorius
e1f0e4cb0c Perform an atomic policy file change
The policy.json file is currently read continually by the
services and is not only read on service start. We therefore
cannot template directly to the file read by the service
(if the service is already running) because the new policies
may not be valid until the service restarts. This is
particularly important during a major upgrade. We therefore
only put the policy file in place after the service restart.
This patch also tidies up the handlers and some of the install
tasks to simplify them and reduce the tasks/code a little.
Change-Id: I8ece1f91db9177f30623f09036e75794d607e17e
2017年05月02日 08:49:04 +00:00
Jean-Philippe Evrard
3b6300f3ce Phase out trusty and use systemd
We don't support trusty in master anymore, so this makes sures the
support of upstart is phased out.
Whenever possible, we use the systemd module instead, that reduces the
amount of tasks.
Change-Id: I50d377ce6c5e80386954fd551e566c55f57c5a3a
Signed-off-by: Jean-Philippe Evrard <jean-philippe.evrard@rackspace.co.uk>
2017年01月20日 12:53:06 +00:00
Jesse Pretorius
0997138c0e Fix linting issues for ansible-lint 3.4.1
Preparing this role for the ansible-lint version bump
Change-Id: I36f5b951b5dcaa52e35079f32e98f2aae94e2df0
2016年11月07日 09:57:08 +00:00
Jesse Pretorius
dba2e47fc1 Use dictionary for service group mappings
Change the 'cloudkitty_service_names' from a list to a dictionary mapping
of services, groups that install those services. This brings the
method into line with that used in the os_neutron role in order to
implement a more standardised method.
The init tasks have been updated to run once and loop through this
mapping rather than being included multiple times and re-run against
each host. This may potentially reduce role run times.
Currently the reload of upstart/systemd scripts may not happen if
only one script changes as the task uses a loop with only one result
register. This patch implements handlers to reload upstart/systemd
scripts to ensure that this happens when any one of the scripts
change.
The handler to reload the services now only tries to restart the
service if the host is in the group for the service according to the
service group mapping. This allows us to ensure that handler
failures are no longer ignored and that no execution time is wasted
trying to restart services which do not exist on the host.
Finally:
- Common variables shared by each service's template files have
 been updated to use the service namespaced variables.
- Unused handlers have been removed.
- Unused variables have been removed.
Change-Id: Ieb96fac62906ac9eb387edb450df0c0ca9c0ccb2
2016年09月29日 07:24:46 +01:00
Michael Rice
284c318e6e first commit 2016年05月08日 12:03:41 -05:00