Closed le9i0nx closed 8 years ago
When I check the templates with diff -u
, the only differences I see are:
--- ferm-post.j2 2015-09-04 14:54:39.445720601 +0200
+++ ferm-pre.j2 2015-09-04 14:54:39.457720695 +0200
@@ -18,6 +18,11 @@
(ansible_local.cap12s.enabled | bool and 'cap_net_admin' in ansible_local.cap12s.list)))))) %}
ENABLED="yes"
{% else %}
+{% if ((ansible_local|d() and ansible_local.ferm|d() and ansible_local.ferm.enabled|d() and ansible_local.ferm.enabled | bool) and
+ not ferm | bool) %}
+ENABLED="yes"
+{% else %}
ENABLED="no"
{% endif %}
+{% endif %}
For the ansible_managed
line, that will always be changed if you specify the filename and date in this field in ansible.cfg
, if you change it for a static string, it shouldn't change.
As for the empty removed lines, I'm not sure what's happening there. Can you check if you have current debops.ferm
version and what are the differences between templates?
I use master. This occurs because https://github.com/debops/ansible-ferm/blob/master/templates/etc/default/ferm-pre.j2#L1 https://github.com/debops/ansible-ferm/blob/master/templates/etc/default/ferm-post.j2#L1
Different scripts generate different first lines -# Ansible managed: /home/le9i0nx/crypt/ansible/roles/debops.ferm/templates/etc/default/ferm-post.j2 modified on 2015-09-24 11:22:42 by le9i0nx on itregion-gavrilov +# Ansible managed: /home/le9i0nx/crypt/ansible/roles/debops.ferm/templates/etc/default/ferm-pre.j2 modified on 2015-09-24 11:22:42 by le9i0nx on itregion-gavrilov ferm-post.j2 ferm-pre.j2
I suppose both templates could be put into one, but I need to check the logic to make sure it works correctly in different scenarios. Give me some time, please. :)
+1 ansible_managed issue
https://github.com/debops/ansible-ferm/blob/master/tasks/main.yml#L43 https://github.com/debops/ansible-ferm/blob/master/tasks/main.yml#L187