At the moment we don't restart services if systemd unit file is changed.
We knowingly prevent systemd_service role handlers to execute
by providing `state: started` as otherwise service will be restarted twice.
With that now we ensure that role handlers will also listen for systemd
unit changes.
Change-Id: Ibb1b0159ca8267ce3ab6ffb1752ab10ddb4b8139
/etc/cinder was used instead of /etc/ceilometer in the task
that removes config directory. So the config directory was
never removed.
Change-Id: Idb8555a98e412cde15a5a328a4a7471202aaf6c3
This line snuck in with I64e3f78eff6bf084fa7ab54d88b667b8fb07c15e
probably to bring it in line with other OSA roles, but should already
be covered by the distribution_major_version line above.
Change-Id: Ib0633cb165ae1f8eee2955cea73837f5117b13d9
Use a first_found lookup instead of a with_first_found loop so that
the 'paths' parameter can be used.
This ensures that only vars from the role are included, and not vars
from a parent calling role. This can happen when a parent role has
a higher priority vars file available for inclusion than the role
it calls.
Change-Id: I64e3f78eff6bf084fa7ab54d88b667b8fb07c15e
Since we still use ceph-ansible that has their own implementation of
config_template module it's worth to use mentioned module as a collection
explicitly.
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/819814
Change-Id: I9fd74b740de2ce0608c4c076c6fa961674bdbde7
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: Ia0b927fe775d5638cd09ecb91af550892764353d
This aims to make possible to define ceilometer_pipeline_user_content
filepath instead of making huge overrides. In the meanwhile default
behaviour should be kept with minimal influence on the existing
deployments.
Change-Id: I0a0ac1b9bbdb8b6a68f870f0ae03edbee8c63d68
run_once can't be replaced with such condition since config files should
be put against all groups, and not only api one.
Change-Id: I5ead13059f0494d53a2d5961b03e8c618b3f5635
We use the same condition, which defines against what host some "service"
tasks should run against, several times. It's hard to keep it the same
across the role and ansible spending additional resources to evaluate
it each time, so it's simpler and better for the maintenance to set
a boolean variable which will say for all tasks, that we want to run
only against signle host, if they should run or not now.
Change-Id: I6247f86b26d1e0dac55fa863a19405ff171c82ff
Instead of bothering with definition of python lib dirs per distro,
we can just get ceilometer library directory with python command.
`ceilometer_lib_dir` variable is mainly used by post_install task.
This variable is not set correctly at the moment if role is ran with
ceilometer-config tag. So this patch also fix running role with that tag
Change-Id: Id4fe9a8eef27bdd1c71104007e6b493f3f5109d5
When src is provided to config_template module, content is simply
ignored. So we should set tmp_f only when content is not provided.
This also means that we should use native file lookup instead of
pipe.
Additionally when statements shouldn't include Jinja2 delimiters.
Change-Id: I9ff2fdea02ca71068dab9cfcab10ca60785821de
Unfortunatelly CentOS 7 do not have libvirt libraries
for py3, so isntead of symlinking them, we have to install devel package
and build them inside venv.
Change-Id: Ibcfb82f2b34c0f9db299262ed3b200f87953e043
A fix on my patch: https://review.opendev.org/#/c/694055/
If the current host is not in the ceilometer-agent-notification group
then the intersection of the current hosts group_names will produce an
empty list. This should be checked before evaluating the next conditional.
Change-Id: Ib3a84516e0f00e84c6869fa58e9595062c6fbede
Ceilometer sometimes may not be used. On a run through of Stein to Train
upgrade there is an error:
'Error while evaluating conditional ... list object has no element 0'
This patch ensures that the ansible group has members before trying to
reference the first group member.
Change-Id: I4ffba430d174a32e586fefd8ee636b6b8405486e
This patch refactors the openstack user/service/endpoints creation to
service_setup.yml which will eventually be managed by
openstack-ansible-tests.
Change-Id: I1e7853c385fbd449c1e4d08e0d09725c4dff95a8
Packages from ceilometer_developer_mode_distro_packages were moved
to ceilometer_devel_distro_packages list.
Change-Id: Ia47c56d7fccb36d99a6368b836b48613500beea6
keystone_authtoken is not used by ceilometer, so there is no need to
deploy and maintain it. In addition, improved logic of
ceilometer_service_setup include, as ceilometer need
keystone credentials only for pollsters,
so credentials are created only when ceilometer-polling group is defined
Change-Id: I8bfc4ca1e87edf70e61a03db0854d0ae32ab2bc7
The variables ceilometer_developer_mode and ceilometer_venv_download
no longer carry any meaning. This review changes ceilometer to
do the equivalent of what developer_mode was all the time,
meaning that it always builds the venv and never requires
the repo server, but it will use a repo server when available.
As part of this, we move the source build out of its own file
because it's now a single task to include the venv build role.
This is just to make it easier to follow the code.
We also change include_tasks to import_tasks and include_role
to import_role so that the tags in the python_venv_build role
will work.
Change-Id: Ib6423249ad6d8c24382a0d82229f766d34255ee9