From 83acffb6b998c2230830e7a4341a5b37c6954e8b Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 12 Jul 2017 06:26:04 -0500 Subject: [PATCH] Replace hand-written slug with ansible_managed There is an ansible_managed variable that can be referenced in templates to add a comment about a file being managed by ansible. Use it. Change-Id: I60c27cf0eb35dcd4805c3517b3b7e0c7d9a0b3ea --- roles/configure-mirrors/templates/.pydistutils.cfg.j2 | 4 +--- roles/configure-mirrors/templates/etc/apt/sources.list.j2 | 4 +--- roles/configure-mirrors/templates/etc/pip.conf.j2 | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/roles/configure-mirrors/templates/.pydistutils.cfg.j2 b/roles/configure-mirrors/templates/.pydistutils.cfg.j2 index a1cdde33c..d92c8b74a 100644 --- a/roles/configure-mirrors/templates/.pydistutils.cfg.j2 +++ b/roles/configure-mirrors/templates/.pydistutils.cfg.j2 @@ -1,6 +1,4 @@ -# This file is generated by Ansible -# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN -# +# {{ ansible_managed }} [easy_install] index_url = {{ pypi_mirror }} {% if mirror_domain is defined %} diff --git a/roles/configure-mirrors/templates/etc/apt/sources.list.j2 b/roles/configure-mirrors/templates/etc/apt/sources.list.j2 index bf302651c..cfff12d69 100644 --- a/roles/configure-mirrors/templates/etc/apt/sources.list.j2 +++ b/roles/configure-mirrors/templates/etc/apt/sources.list.j2 @@ -1,6 +1,4 @@ -# This file is generated by Ansible -# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN -# +# {{ ansible_managed }} deb {{ package_mirror }} {{ ansible_distribution_release }} main universe deb {{ package_mirror }} {{ ansible_distribution_release }}-updates main universe deb {{ package_mirror }} {{ ansible_distribution_release }}-backports main universe diff --git a/roles/configure-mirrors/templates/etc/pip.conf.j2 b/roles/configure-mirrors/templates/etc/pip.conf.j2 index 4f461fc30..dcce39e39 100644 --- a/roles/configure-mirrors/templates/etc/pip.conf.j2 +++ b/roles/configure-mirrors/templates/etc/pip.conf.j2 @@ -1,6 +1,4 @@ -# This file is generated by Ansible -# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN -# +# {{ ansible_managed }} [global] timeout = 60 index-url = {{ pypi_mirror }}