diff options
Diffstat (limited to 'fdio.infra.ansible/roles/consul')
-rw-r--r-- | fdio.infra.ansible/roles/consul/defaults/main.yaml | 27 | ||||
-rw-r--r-- | fdio.infra.ansible/roles/consul/tasks/main.yaml | 12 | ||||
-rw-r--r-- | fdio.infra.ansible/roles/consul/templates/consul.hcl.j2 | 12 |
3 files changed, 7 insertions, 44 deletions
diff --git a/fdio.infra.ansible/roles/consul/defaults/main.yaml b/fdio.infra.ansible/roles/consul/defaults/main.yaml index b875c88c74..1bb72f1a15 100644 --- a/fdio.infra.ansible/roles/consul/defaults/main.yaml +++ b/fdio.infra.ansible/roles/consul/defaults/main.yaml @@ -36,7 +36,6 @@ consul_inst_dir: "/opt" consul_lockfile: "/var/lock/subsys/consul" consul_run_dir: "/var/run/consul" consul_ssl_dir: "/etc/consul.d/ssl" -nomad_config_dir: "/etc/nomad.d" # Conf - Service. consul_node_role: "both" @@ -50,25 +49,6 @@ consul_group_state: "present" consul_user: "consul" consul_user_state: "present" -# Conf - nomad.d/consul.hcl -consul_nomad_integration: true -consul_certificates: - - src: "{{ file_consul_ca_pem }}" - dest: "{{ consul_ca_file }}" - - src: "{{ file_consul_server_0_pem }}" - dest: "{{ consul_cert_file }}" - - src: "{{ file_consul_server_0_key_pem }}" - dest: "{{ consul_key_file }}" - -consul_auto_advertise: true -consul_checks_use_advertise: true -consul_server_service_name: "nomad" -consul_client_service_name: "nomad-client" -consul_server_auto_join: false -consul_client_auto_join: true -consul_ACL_token_set: false -consul_token: "consul_token_default" - # Conf - base.hcl consul_bind_addr: "{{ ansible_default_ipv4.address }}" consul_client_addr: "0.0.0.0" @@ -89,6 +69,13 @@ consul_ui_config: consul_recursors: - 1.1.1.1 - 8.8.8.8 +consul_certificates: + - src: "{{ file_consul_ca_pem }}" + dest: "{{ consul_ca_file }}" + - src: "{{ file_consul_server_0_pem }}" + dest: "{{ consul_cert_file }}" + - src: "{{ file_consul_server_0_key_pem }}" + dest: "{{ consul_key_file }}" # Conf - ports.hcl consul_port_dns: 53 diff --git a/fdio.infra.ansible/roles/consul/tasks/main.yaml b/fdio.infra.ansible/roles/consul/tasks/main.yaml index 834d7f1798..f4e08259da 100644 --- a/fdio.infra.ansible/roles/consul/tasks/main.yaml +++ b/fdio.infra.ansible/roles/consul/tasks/main.yaml @@ -96,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 diff --git a/fdio.infra.ansible/roles/consul/templates/consul.hcl.j2 b/fdio.infra.ansible/roles/consul/templates/consul.hcl.j2 deleted file mode 100644 index c78e5e1ce5..0000000000 --- a/fdio.infra.ansible/roles/consul/templates/consul.hcl.j2 +++ /dev/null @@ -1,12 +0,0 @@ -consul { - auto_advertise = {{ consul_auto_advertise | bool | lower }} - checks_use_advertise = {{ consul_checks_use_advertise | bool | lower }} - client_auto_join = {{ consul_client_auto_join | bool | lower }} - client_service_name = "{{ consul_client_service_name }}" - server_service_name = "{{ consul_server_service_name }}" - server_auto_join = {{ consul_server_auto_join | bool | lower }} -{% if consul_ACL_token_set == True %} - token = "{{ consul_token }}" -{% endif %} - -}
\ No newline at end of file |