wtsi-hgi/hgi-systems

`ansible-consul : consul config file` task is not idempotent

Closed this issue · 4 comments

Task path: /data/hgi-systems/subrepos/ansible-consul/tasks/install.yml:192

Running a diff on the files before and after a change shows changes in the order of the "retry_join" values.

Before:

    "retry_join": [
        "192.168.102.51",
        "192.168.102.47"
    ],

After:

    "retry_join": [
        "192.168.102.47",
        "192.168.102.51"
    ],

Needs a | sort here:

"retry_join_wan": [{% for host in consul_servers_wan | difference(ansible_all_ipv4_addresses) %}"{{host}}"{% if not loop.last %}, {% endif %}{% endfor %}],

Pull request with fix pending: mattfinlayson/ansible-consul#198. Switched to using our fork to get the fix without waiting for the merge upstream.