lpirl / ansible-roles

my personal Ansible roles – feel free to review, use, extend or ignore
6 stars 2 forks source link

Using tests as a filter will be deprecated in Ansible 2.9 #1

Closed MaxiBoether closed 4 years ago

MaxiBoether commented 6 years ago

To ensure future compatability with Ansible, we should fix this. This affects the following files:

ansible-roles/roles/managed_host/tasks/hardening-report.yml: we should change the line until: rkhunter_download|success New syntax is probably something along those lines (if I understand [1] correctly):

until:
 - rkhunter_download is successful

ansible-roles/roles/remote_desktop_server/tasks/main.yml: when: add_apt_repository|changed should probably be when: add_apt_repository is changed

ansible-roles/roles/managed_host/tasks/apache2.yml: when: apache2_installed_check.rc == 0 and when: apache2_installed_check.rc == 0, not sure whether is 0 or equals 0 or something like that is the correct syntax, needs some googling.

[1] https://docs.ansible.com/ansible/2.5/porting_guides/porting_guide_2.5.html#deprecation-notices

lpirl commented 6 years ago

Thanks for reminding me to take care of this @MaxiBoether . You can check out current master, which should not print deprecation warnings anymore (tested with Ansible 2.6 except the remote_desktop_server role, since I do not have such a machine at the moment).

MaxiBoether commented 4 years ago

With Ansible 2.10, I get no deprecation warnings at all, hence I consider this issue as closed. Thank you for implementing this :)