StackStorm / ansible-st2

Ansible Roles and Playbooks to deploy StackStorm
https://galaxy.ansible.com/StackStorm/stackstorm/
Apache License 2.0
100 stars 75 forks source link

Pass lists of packages to yum/apt/package modules instead of relying on squashed loops #203

Closed cognifloyd closed 5 years ago

cognifloyd commented 6 years ago

Ansible 2.7 deprecates using squash actions which will be removed in Ansible 2.11 https://docs.ansible.com/ansible/2.7/porting_guides/porting_guide_2.7.html#using-a-loop-on-a-package-module-via-squash-actions

To keep the current behavior, we'll need to update these tasks before 2.11 is released Q4 2019 - Q1 2020 (my guess). Note that, current modules already support passing the list of packages directly instead of using a squashed loop (since ansible 2.3).

We currently rely on squash actions for these tasks:

https://github.com/StackStorm/ansible-st2/blob/994743dd7f3795de2512438e5aa3eecc4ad2d53a/roles/st2/tasks/auth.yml#L3-L8 https://github.com/StackStorm/ansible-st2/blob/994743dd7f3795de2512438e5aa3eecc4ad2d53a/roles/st2/tasks/auth.yml#L17-L22 https://github.com/StackStorm/ansible-st2/blob/b61c3ce595cb808b98467650ea7e8417abf5e2ba/roles/st2repo/tasks/st2repo_apt.yml#L4-L13 https://github.com/StackStorm/ansible-st2/blob/512888e171aa8264bdaf43f169683ee2fdee763b/roles/bwc/tasks/bwc_repos_apt.yml#L5-L10 https://github.com/StackStorm/ansible-st2/blob/b478dec6e835df7587f2ad756e1a636b7ece5eed/roles/mongodb/tasks/mongodb_yum.yml#L4-L16 https://github.com/StackStorm/ansible-st2/blob/b478dec6e835df7587f2ad756e1a636b7ece5eed/roles/mongodb/tasks/mongodb_apt.yml#L24-L38 https://github.com/StackStorm/ansible-st2/blob/86645ee18a5fc9096fb454fa8ebf35cbe93ae0e5/roles/postgresql/tasks/postgresql_yum7.yml#L4-L10 https://github.com/StackStorm/ansible-st2/blob/86645ee18a5fc9096fb454fa8ebf35cbe93ae0e5/roles/postgresql/tasks/postgresql_yum6.yml#L39-L45