fgci-org / fgci-ansible

:microscope: Collection of the Finnish Grid and Cloud Infrastructure Ansible playbooks
MIT License
54 stars 18 forks source link

Set ansible_managed string in ansible.cfg #137

Closed jabl closed 8 years ago

jabl commented 8 years ago

By making the ansible_managed string not contain timestamps, usernames etc. we can avoid ansible considering a file changed and triggering service restarts needlessly.

See https://github.com/ansible/ansible/issues/5317

martbhell commented 8 years ago

Thanks for the PR! This is better than not using ansible_managed at all and just entering a comment.

For reference the default 1 of ansible_managed is set to

ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}

Resluts in this:

# Ansible managed: /home/user/git/fgci-ansible/roles/ansible-role-slurm/templates/gres.conf.j2 modified on 2016-06-27 11:44:33 by user on mylaptop.example.com

Maybe the way some sites do the deployment (a shared build/deploy user and from one management server) could mean that parts of the ansible_managed could still be useful - but the date is troublesome.