ansible-st2 icon indicating copy to clipboard operation
ansible-st2 copied to clipboard

Support for only installing select services on a node

Open nmaludy opened this issue 4 years ago • 1 comments

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?

Thanks!

nmaludy avatar Dec 23 '20 14:12 nmaludy

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 11 '22 10:05 CLAassistant