diff --git a/ansible/roles/configure-consul/tasks/configure.yml b/ansible/roles/configure-consul/tasks/configure.yml index 9389c7d..83091e6 100644 --- a/ansible/roles/configure-consul/tasks/configure.yml +++ b/ansible/roles/configure-consul/tasks/configure.yml @@ -26,3 +26,8 @@ owner: root group: root mode: 0644 + +- name: Reload systemd daemon + become: true + systemd: + daemon_reload: true \ No newline at end of file diff --git a/ansible/roles/configure-consul/tasks/main.yml b/ansible/roles/configure-consul/tasks/main.yml index dcda34c..616c7ad 100644 --- a/ansible/roles/configure-consul/tasks/main.yml +++ b/ansible/roles/configure-consul/tasks/main.yml @@ -35,7 +35,7 @@ state: started when: ansible_check_mode == false -- name: Check if consul is running +- name: Check if consul is running with `consul members` become: true shell: consul members register: consul_members diff --git a/ansible/roles/configure-nomad/tasks/configure.yml b/ansible/roles/configure-nomad/tasks/configure.yml index 947765c..cfbe661 100644 --- a/ansible/roles/configure-nomad/tasks/configure.yml +++ b/ansible/roles/configure-nomad/tasks/configure.yml @@ -35,3 +35,8 @@ owner: root group: root mode: 0644 + +- name: Reload systemd daemon + become: true + systemd: + daemon_reload: true diff --git a/ansible/roles/configure-nomad/tasks/main.yml b/ansible/roles/configure-nomad/tasks/main.yml index a5f89f7..ecb90f9 100644 --- a/ansible/roles/configure-nomad/tasks/main.yml +++ b/ansible/roles/configure-nomad/tasks/main.yml @@ -55,7 +55,7 @@ - name: Check nomad members become: true - shell: nomad members + shell: nomad server members register: nomad_members when: ansible_check_mode == false diff --git a/ansible/roles/ssh/tasks/main.yml b/ansible/roles/ssh/tasks/main.yml index bef5d4a..1fb76ce 100644 --- a/ansible/roles/ssh/tasks/main.yml +++ b/ansible/roles/ssh/tasks/main.yml @@ -28,4 +28,4 @@ - name: Tell user to generate openVPN configuration for users debug: - msg: "Please generate openVPN configuration for users: {{ task_result.results | map(attribute='item') | map(attribute='user') | list | join(', ') }}. See https://docs.redbrick.dcu.ie/aperture/vpn/ for more information." \ No newline at end of file + msg: "Please generate openVPN configuration for users: {{ task_result.results | map(attribute='item') | map(attribute='user') | list | join(', ') }}. See https://docs.redbrick.dcu.ie/aperture/vpn/ for more information." diff --git a/ansible/templates/consul.hcl.j2 b/ansible/templates/consul.hcl.j2 index a95d8dd..3851a3e 100644 --- a/ansible/templates/consul.hcl.j2 +++ b/ansible/templates/consul.hcl.j2 @@ -30,4 +30,4 @@ performance { } # TODO: change once DNS is running on a host -recursors = [] # adds DNS forwarding for non-`.consul` domains +recursors = ["10.10.0.1"] # adds DNS forwarding for non-`.consul` domains