Skip to content

Commit

Permalink
Configure TLS before starting consul for the first time.
Browse files Browse the repository at this point in the history
  • Loading branch information
dggreenbaum committed Feb 18, 2017
1 parent e2285fe commit 0c3c636
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
- name: Include OS-specific variables.
include_vars: "{{ ansible_os_family }}.yml"

- name: Install specified packages
- name: Install specified packages
include: install.yml

- block:
Expand Down Expand Up @@ -100,7 +100,7 @@
- /var/log/consul
- /var/run/consul
- /etc/consul.d
- /etc/consul.d/bootstrap
- /etc/consul.d/bootstrap
- /etc/consul.d/client
- /etc/consul.d/server

Expand Down Expand Up @@ -143,6 +143,9 @@
template: src=consul_systemd.service.j2 dest=/lib/systemd/system/consul.service owner=root group=root mode=644
when: ansible_service_mgr == "systemd"

- include: ../tasks/tls.yml
when: consul_tls_enable

- name: Start Consul
service: name=consul state=started enabled=yes

Expand All @@ -158,10 +161,7 @@
- include: ../tasks/iptables.yml
when: consul_iptables_enable

- include: ../tasks/tls.yml
when: consul_tls_enable

- include: ../tasks/client.yml
when: consul_node_role == "client" and ansible_os_family == "Debian"

when: not bootstrap_marker.stat.exists

0 comments on commit 0c3c636

Please sign in to comment.