- name: Inst - Update Package Cache (APT)
apt:
- update_cache: yes
+ update_cache: true
cache_valid_time: 3600
when:
- ansible_distribution|lower == 'ubuntu'
group:
name: "{{ consul_group }}"
state: "{{ consul_group_state }}"
- when:
- - consul_manage_group | bool
tags:
- consul-conf-user
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
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"
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