Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7711 from mtnbikenc/fix-1529575
[1529575] Ensure etcd.conf variables are updated during upgrade
- Loading branch information
Showing
4 changed files
with
49 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
# This task file ensures expected variables exist in the case where systems have | ||
# been upgraded from states where these values were not initially configured. | ||
|
||
- name: Ensure ETCD_CA_FILE is absent | ||
lineinfile: | ||
destfile: "{{ etcd_conf_file }}" | ||
regexp: 'ETCD_CA_FILE' | ||
state: absent | ||
|
||
- name: Ensure ETCD_PEER_CA_FILE is absent | ||
lineinfile: | ||
destfile: "{{ etcd_conf_file }}" | ||
regexp: 'ETCD_PEER_CA_FILE' | ||
state: absent | ||
|
||
- name: Ensure ETCD_QUOTA_BACKEND_BYTES exists | ||
lineinfile: | ||
destfile: "{{ etcd_conf_file }}" | ||
regexp: '^ETCD_QUOTA_BACKEND_BYTES=' | ||
line: 'ETCD_QUOTA_BACKEND_BYTES={{ etcd_quota_backend_bytes }}' | ||
|
||
- name: Ensure ETCD_CLIENT_CERT_AUTH exists | ||
lineinfile: | ||
destfile: "{{ etcd_conf_file }}" | ||
regexp: '^ETCD_CLIENT_CERT_AUTH=' | ||
line: 'ETCD_CLIENT_CERT_AUTH="true"' | ||
|
||
- name: Ensure ETCD_PEER_CLIENT_CERT_AUTH exists | ||
lineinfile: | ||
destfile: "{{ etcd_conf_file }}" | ||
regexp: '^ETCD_PEER_CLIENT_CERT_AUTH=' | ||
line: 'ETCD_PEER_CLIENT_CERT_AUTH="true"' | ||
|
||
- name: Ensure ETCD_TRUSTED_CA_FILE exists | ||
lineinfile: | ||
destfile: "{{ etcd_conf_file }}" | ||
regexp: '^ETCD_TRUSTED_CA_FILE=' | ||
line: 'ETCD_TRUSTED_CA_FILE={{ etcd_ca_file }}' | ||
|
||
- name: Ensure ETCD_PEER_TRUSTED_CA_FILE exists | ||
lineinfile: | ||
destfile: "{{ etcd_conf_file }}" | ||
regexp: '^ETCD_PEER_TRUSTED_CA_FILE=' | ||
line: 'ETCD_PEER_TRUSTED_CA_FILE={{ etcd_peer_ca_file }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters