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

Logrotate broken with Python3

Open mtsinc1 opened this issue 5 years ago • 0 comments

Python2 goes end-of-life January 2020. Distro vendors have been scrambling to upgrade to Python3 and this appears to include the recent Ansible 2.8.0 release. A previously-functioning project using ansible-logrotate now fails because Python3 does not implement iteritems.

Change required - file logrotate/templates/logrotate.d.j2

FROM: {%- for name, script in item.scripts.iteritems() -%} TO: {%- for name, script in item.scripts.items() | list -%}

mtsinc1 avatar Jun 10 '19 18:06 mtsinc1