Skip to content

Commit

Permalink
no become on local_action
Browse files Browse the repository at this point in the history
  • Loading branch information
brianshumate committed Dec 20, 2016
1 parent bba23a8 commit a4133b7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,3 +299,7 @@
spurious races cause failure to re-establish cluster quorum when doing so
- CONSUL_VERSION environment variable
- Deprecated default variables cleanup

## v1.6.3

- Ensure that all local_action tasks have become: no (thanks @itewk)
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Thank you to all these fine folk for helping with ansible-consul!
- [@crumohr](https://github.com/crumohr)
- [@kostyrevaa](https://github.com/kostyrevaa)
- [@violuke](https://github.com/violuke)
- [itewk](https://github.com/itewk)
4 changes: 4 additions & 0 deletions tasks/acl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

- name: Writing ACL master token locally to share with other servers that are new
local_action: copy content={{ consul_acl_master_token }} dest=/tmp/acl_master_token
become: no
when: consul_acl_master_token is defined

- name: Reading ACL master token for servers that are missing it
Expand All @@ -22,6 +23,7 @@

- name: Deleting ACL master token file
local_action: file path=/tmp/acl_master_token state=absent
become: no

- block:
- name: Look for an existing ACL replication token on a previously boostrapped server
Expand All @@ -35,13 +37,15 @@

- name: Writing ACL replication token locally to share with other servers that are new
local_action: copy content={{ consul_acl_replication_token }} dest=/tmp/acl_replication_token
become: no
when: consul_acl_replication_token is defined

- name: Reading ACL replication token for servers that are missing it
set_fact: consul_acl_replication_token="{{ lookup('file', '/tmp/acl_replication_token') }}"
when: consul_acl_replication_token is not defined

- name: Deleting ACL replication token file
become: no
local_action: file path=/tmp/acl_replication_token state=absent

- block:
Expand Down
2 changes: 2 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@

- name: Writing key locally to share with other servers that are new
local_action: copy content={{ consul_raw_key }} dest=/tmp/consul_raw.key
become: no
when: consul_raw_key is defined and bootstrap_marker.stat.exists

- name: Reading key for servers that are missing it
Expand All @@ -77,6 +78,7 @@

- name: Deleting key file
local_action: file path=/tmp/consul_raw.key state=absent
become: no
when: consul_raw_key is defined and bootstrap_marker.stat.exists

- block:
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.2
v1.6.3

0 comments on commit a4133b7

Please sign in to comment.