Fix deprecation warning with ansible 2.7
[DEPRECATION WARNING]: Invoking "apt" 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: ['{{ nft_old_pkg_list }}']` and remove the loop. This feature will be removed in version 2.11. Signed-off-by: Julien Viard de Galbert <julien@vdg.name>
This commit is contained in:
parent
7750b03e26
commit
5394cedc2a
|
@ -7,6 +7,10 @@
|
||||||
* Clean tasks name and comments in tasks/main.yml file.
|
* Clean tasks name and comments in tasks/main.yml file.
|
||||||
* Order and clean comments in defaults/main.yml file.
|
* Order and clean comments in defaults/main.yml file.
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
* Fix deprecation warning with ansible 2.7: Invoking "apt" only once while
|
||||||
|
using a loop via squash_actions is deprecated.
|
||||||
|
|
||||||
## v1.5.0
|
## v1.5.0
|
||||||
|
|
||||||
### Enhancements
|
### Enhancements
|
||||||
|
|
|
@ -13,20 +13,16 @@
|
||||||
# Manage packages [[[1
|
# Manage packages [[[1
|
||||||
- name: Ensure Nftables packages are in there desired state
|
- name: Ensure Nftables packages are in there desired state
|
||||||
package:
|
package:
|
||||||
name: '{{ item }}'
|
name: '{{ nft_pkg_list | list }}'
|
||||||
state: '{{ nft_pkg_state }}'
|
state: '{{ nft_pkg_state }}'
|
||||||
with_items:
|
|
||||||
- '{{ nft_pkg_list | to_nice_json }}'
|
|
||||||
register: pkg_install_result
|
register: pkg_install_result
|
||||||
until: pkg_install_result is success
|
until: pkg_install_result is success
|
||||||
when: nft_enabled|bool
|
when: nft_enabled|bool
|
||||||
|
|
||||||
- name: Ensure old Iptables packages are in there desired state
|
- name: Ensure old Iptables packages are in there desired state
|
||||||
apt:
|
apt:
|
||||||
name: '{{ item }}'
|
name: '{{ nft_old_pkg_list | list }}'
|
||||||
state: '{{ nft_old_pkg_state }}'
|
state: '{{ nft_old_pkg_state }}'
|
||||||
with_items:
|
|
||||||
- '{{ nft_old_pkg_list | to_nice_json }}'
|
|
||||||
register: pkg_remove_result
|
register: pkg_remove_result
|
||||||
until: pkg_remove_result is success
|
until: pkg_remove_result is success
|
||||||
when: (nft_enabled|bool and
|
when: (nft_enabled|bool and
|
||||||
|
|
Loading…
Reference in New Issue