X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=fdio.infra.ansible%2Froles%2Fconsul%2Ftasks%2Fmain.yaml;h=f4e08259da77b775c8a2e4d5fc5af0cd1a8848c3;hb=refs%2Fchanges%2F13%2F33613%2F1;hp=99ac52da4430a7f6c3079ff46dffee84bf5742f0;hpb=df5672b3d9c29b51397f4770eb992c9f3f3955ce;p=csit.git diff --git a/fdio.infra.ansible/roles/consul/tasks/main.yaml b/fdio.infra.ansible/roles/consul/tasks/main.yaml index 99ac52da44..f4e08259da 100644 --- a/fdio.infra.ansible/roles/consul/tasks/main.yaml +++ b/fdio.infra.ansible/roles/consul/tasks/main.yaml @@ -3,7 +3,7 @@ - name: Inst - Update Package Cache (APT) apt: - update_cache: yes + update_cache: true cache_valid_time: 3600 when: - ansible_distribution|lower == 'ubuntu' @@ -21,8 +21,6 @@ group: name: "{{ consul_group }}" state: "{{ consul_group_state }}" - when: - - consul_manage_group | bool tags: - consul-conf-user @@ -30,11 +28,8 @@ user: name: "{{ consul_user }}" group: "{{ consul_group }}" - groups: "{{ consul_user_groups }}" state: "{{ consul_user_state }}" system: true - when: - - consul_manage_user | bool tags: - consul-conf-user @@ -101,18 +96,6 @@ tags: - consul-conf -- name: Conf - Nomad integration Consul Configuration - template: - src: consul.hcl.j2 - dest: "{{ nomad_config_dir }}/consul.hcl" - owner: "nomad" - group: "nomad" - mode: 0644 - when: - - consul_nomad_integration | bool - tags: - - consul-conf - - name: Conf - Base Configuration template: src: base.hcl.j2 @@ -167,6 +150,15 @@ tags: - consul-conf +- name: Conf - Stop Systemd-resolved + systemd: + daemon_reload: true + enabled: false + name: "systemd-resolved" + state: "{{ systemd_resolved_state }}" + tags: + - consul-conf + - name: Conf - System.d Script template: src: "consul_systemd.service.j2" @@ -174,9 +166,10 @@ owner: "root" group: "root" mode: 0644 -# notify: -# - "Restart Consul" -# - "Stop Systemd-resolved" -# - "Restart Nomad" + notify: + - "Restart Consul" + - "Restart Nomad" tags: - consul-conf + +- meta: flush_handlers