summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2017-10-03 12:07:24 -0700
committerGitHub <noreply@github.com>2017-10-03 12:07:24 -0700
commit85dd3c223eff93d3c82da1487c8926f3632c670e (patch)
treee164a9255e101c696bc0659978d1389993752bda /roles
parent478cf5dc597433c75de0f513a26eb77a41c38e38 (diff)
parent0827fe8dda5fb4eac0c41b7936db46fbbcca603d (diff)
downloadopenshift-85dd3c223eff93d3c82da1487c8926f3632c670e.tar.gz
openshift-85dd3c223eff93d3c82da1487c8926f3632c670e.tar.bz2
openshift-85dd3c223eff93d3c82da1487c8926f3632c670e.tar.xz
openshift-85dd3c223eff93d3c82da1487c8926f3632c670e.zip
Merge pull request #5633 from mgugino-upstream-stage/fix-node-cloudprovider
Automatic merge from submit-queue. Move node aws credentials to config.yml Currently, the node service is started before aws credentials (if needed) are configured. This commit ensures the aws credentials are placed before the node service is started. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1497150
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_node/tasks/config.yml16
-rw-r--r--roles/openshift_node/tasks/main.yml16
2 files changed, 16 insertions, 16 deletions
diff --git a/roles/openshift_node/tasks/config.yml b/roles/openshift_node/tasks/config.yml
index 2759188f3..e3898b520 100644
--- a/roles/openshift_node/tasks/config.yml
+++ b/roles/openshift_node/tasks/config.yml
@@ -46,6 +46,22 @@
notify:
- restart node
+- name: Configure AWS Cloud Provider Settings
+ lineinfile:
+ dest: /etc/sysconfig/{{ openshift.common.service_type }}-node
+ regexp: "{{ item.regex }}"
+ line: "{{ item.line }}"
+ create: true
+ with_items:
+ - regex: '^AWS_ACCESS_KEY_ID='
+ line: "AWS_ACCESS_KEY_ID={{ openshift_cloudprovider_aws_access_key | default('') }}"
+ - regex: '^AWS_SECRET_ACCESS_KEY='
+ line: "AWS_SECRET_ACCESS_KEY={{ openshift_cloudprovider_aws_secret_key | default('') }}"
+ no_log: True
+ when: openshift_cloudprovider_kind is defined and openshift_cloudprovider_kind == 'aws' and openshift_cloudprovider_aws_access_key is defined and openshift_cloudprovider_aws_secret_key is defined
+ notify:
+ - restart node
+
# Necessary because when you're on a node that's also a master the master will be
# restarted after the node restarts docker and it will take up to 60 seconds for
# systemd to start the master again
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml
index e82fb42b8..59b8bb76e 100644
--- a/roles/openshift_node/tasks/main.yml
+++ b/roles/openshift_node/tasks/main.yml
@@ -76,22 +76,6 @@
include: config.yml
when: not openshift_node_bootstrap
-- name: Configure AWS Cloud Provider Settings
- lineinfile:
- dest: /etc/sysconfig/{{ openshift.common.service_type }}-node
- regexp: "{{ item.regex }}"
- line: "{{ item.line }}"
- create: true
- with_items:
- - regex: '^AWS_ACCESS_KEY_ID='
- line: "AWS_ACCESS_KEY_ID={{ openshift_cloudprovider_aws_access_key | default('') }}"
- - regex: '^AWS_SECRET_ACCESS_KEY='
- line: "AWS_SECRET_ACCESS_KEY={{ openshift_cloudprovider_aws_secret_key | default('') }}"
- no_log: True
- when: openshift_cloudprovider_kind is defined and openshift_cloudprovider_kind == 'aws' and openshift_cloudprovider_aws_access_key is defined and openshift_cloudprovider_aws_secret_key is defined
- notify:
- - restart node
-
#### Storage class plugins here ####
- name: NFS storage plugin configuration
include: storage_plugins/nfs.yml