Merge branch 'JulienVdG-ansible-2-7-deprecation-fix'

This commit is contained in:
Jeremy Gardais 2019-05-09 13:53:27 +02:00
commit dddc46282d
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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