Skip to content

Commit

Permalink
Stop reconfiguring bootstrap node
Browse files Browse the repository at this point in the history
- Stop reconfiguring bootstrap node as it's not really necessary and
  spurious races cause failure to re-establish cluster quorum when doing so
- CONSUL_VERSION environment variable
- Deprecated default variables cleanup
  • Loading branch information
brianshumate committed Dec 13, 2016
1 parent 4e0b025 commit bba23a8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 17 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,3 +292,10 @@
## v1.6.1

- Drop Trusty support from meta for now (for #19)

## v1.6.2

- Stop reconfiguring bootstrap node as it's not really necessary and
spurious races cause failure to re-establish cluster quorum when doing so
- CONSUL_VERSION environment variable
- Deprecated default variables cleanup
4 changes: 1 addition & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# File: defaults/main.yml - Default variables for Consul

## Core
consul_version: "0.7.1"
consul_version: "{{ lookup('env','CONSUL_VERSION') | default('0.7.1', true) }}"
consul_zip_url: "https://releases.hashicorp.com/consul/{{ consul_version }}/consul_{{ consul_version }}_linux_amd64.zip"
consul_checksum_file_url: "https://releases.hashicorp.com/consul/{{ consul_version }}/consul_{{ consul_version}}_SHA256SUMS"
consul_bin_path: "/usr/local/bin"
Expand Down Expand Up @@ -35,8 +35,6 @@ consul_acl_replication_token_display: "{{ lookup('env','CONSUL_ACL_REPLICATION_T

## TLS
consul_tls_enable: "{{ lookup('env','CONSUL_TLS_ENABLE') | default(false, true) }}"
#consul_src_def: "{{ role_path }}/files"
#consul_src_files: "{{ lookup('env','CONSUL_SRC_FILES') | default(consul_src_def, true) }}"
consul_src_files: "{{ lookup('env','CONSUL_SRC_FILES') | default(role_path+'/files', true) }}"
consul_tls_dir: "{{ lookup('env','CONSUL_TLS_DIR') | default('/etc/consul/ssl', true) }}"
consul_ca_crt: "{{ lookup('env','CONSUL_CA_CRT') | default('ca.crt', true) }}"
Expand Down
13 changes: 0 additions & 13 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,6 @@
- name: Consul up?
wait_for: delay=5 path=/var/run/consul/consul.pid state=present

- block:
- name: Reconfigure bootstrap node (systemd)
replace: dest=/lib/systemd/system/consul.service regexp='bootstrap' replace='server' backup=no
- name: Reload unit configuration
shell: systemctl daemon-reload
notify:
- restart consul
when: consul_node_role == "bootstrap" and ansible_service_mgr == "systemd"

- name: Reconfigure bootstrap node (init.d)
replace: dest=/etc/init.d/consul regexp='bootstrap' replace='server' backup=no
when: consul_node_role == "bootstrap" and not ansible_service_mgr == "systemd" and ansible_distribution_major_version|int <= 7

- name: Bootstrapped marker
file: dest=/etc/consul/.consul_bootstrapped state=touch

Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
v1.6.1
v1.6.2

0 comments on commit bba23a8

Please sign in to comment.