Skip to content

Commit

Permalink
added variable to turn on debugging, for future use, mostly. Moved dn…
Browse files Browse the repository at this point in the history
…smasq/iptables out of 'bootstrapped' tasks, because that kind of decreases their utility.
  • Loading branch information
James Kafader committed Apr 6, 2017
1 parent 1d749ba commit aaed105
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@ consul_iptables_enable: true

### Consul
consul_pkg: "consul_{{ consul_version }}_linux_amd64.zip"

### Print Debug Messages
consul_debug: false
18 changes: 9 additions & 9 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@
- /etc/consul.d/server

#- include: ../tasks/encrypt_gossip.yml
- debug:
msg: "consul_iptables_enable: {{ consul_iptables_enable }}"
when: consul_debug

- include: ../tasks/iptables.yml
when: consul_iptables_enable

- include: ../tasks/dnsmasq.yml
when: consul_dnsmasq_enable

- name: Bootstrap configuration
template:
Expand Down Expand Up @@ -154,15 +163,6 @@
dest: /etc/consul/.consul_bootstrapped
state: touch

- include: ../tasks/dnsmasq.yml
when: consul_dnsmasq_enable

- debug:
msg: "consul_iptables_enable: {{ consul_iptables_enable }}"

- include: ../tasks/iptables.yml
when: consul_iptables_enable

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

Expand Down

0 comments on commit aaed105

Please sign in to comment.