commit | 577fbf5131a8f61fc9074e1ef72ba4257f65c5ce | [log] [tgz] |
---|---|---|
author | Olivier Bourdon <obourdon@mirantis.com> | Wed Nov 09 14:53:02 2016 +0100 |
committer | Olivier Bourdon <obourdon@mirantis.com> | Tue Nov 15 17:55:55 2016 +0100 |
tree | 53b0f0e2cc3b2a509582a411d0507efdf7c00758 | |
parent | c225d893ff77c005401b5039c6e49ecf99f680bc [diff] |
Fix for hosts file idempotence
diff --git a/linux/network/host.sls b/linux/network/host.sls index d913c6f..6749350 100644 --- a/linux/network/host.sls +++ b/linux/network/host.sls
@@ -28,6 +28,8 @@ - repl: {{ after }} - watch: - host: linux_host_{{ name }} + - onlyif: + - grep -q "{{ before }}" /etc/hosts {%- endif %} @@ -35,4 +37,4 @@ {%- endfor %} -{%- endif %} \ No newline at end of file +{%- endif %}