This Ansible module supports only installing/running select services by specifying the st2_services variable. However, when doing so it causes issues in various cases because, for example, things like st2ctl reload --register-all can only be run on a st2actionrunner node where the pack content is available. If you're on a node just running st2api this command is going to fail.
This change does the following:
Implements some simple when conditions for various handlers to only restart services when they are necessary
Fixes st2ctl on the node to only contain the specified services in its COMPONENTS variable, so that st2ctl command still work as expected! :)
Fixes a small deprecation warning on the pip PR i did yesterday:
[DEPRECATION WARNING]: Invoking "pip" only once while using a loop via squash_actions is deprecated. Instead of using a loop to
supply multiple items and specifying `name: "{{ item }}"`, please use `name: '{{ st2_python_packages }}'` and remove the loop.
This feature will be removed from ansible-base in version 2.11. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
@armab i'm thinking about also adding some when conditions to the st2smoketests where appropriate. Could you help me figure out what the conditions should be there?
This Ansible module supports only installing/running select services by specifying the
st2_services
variable. However, when doing so it causes issues in various cases because, for example, things likest2ctl reload --register-all
can only be run on ast2actionrunner
node where the pack content is available. If you're on a node just runningst2api
this command is going to fail.This change does the following:
when
conditions for various handlers to only restart services when they are necessaryst2ctl
on the node to only contain the specified services in itsCOMPONENTS
variable, so thatst2ctl
command still work as expected! :)pip
PR i did yesterday:@armab i'm thinking about also adding some
when
conditions to thest2smoketests
where appropriate. Could you help me figure out what the conditions should be there?Thanks!