summaryrefslogtreecommitdiffstats
path: root/playbooks/gce
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2016-02-02 14:42:23 -0500
committerJason DeTiberus <jdetiber@redhat.com>2016-02-02 14:42:49 -0500
commit2f3458447c23e8020af3dc08444fdb33201118e3 (patch)
tree6e14488702f5538d238fe89451e7fdb4ca7087b7 /playbooks/gce
parente1ff6a9e2e6b60b427effdbe2d205ebcb065b26f (diff)
downloadopenshift-2f3458447c23e8020af3dc08444fdb33201118e3.tar.gz
openshift-2f3458447c23e8020af3dc08444fdb33201118e3.tar.bz2
openshift-2f3458447c23e8020af3dc08444fdb33201118e3.tar.xz
openshift-2f3458447c23e8020af3dc08444fdb33201118e3.zip
Improve docs and consistency of setting the ssh_user
Diffstat (limited to 'playbooks/gce')
-rw-r--r--playbooks/gce/openshift-cluster/config.yml2
-rw-r--r--playbooks/gce/openshift-cluster/list.yml2
-rw-r--r--playbooks/gce/openshift-cluster/service.yml4
-rw-r--r--playbooks/gce/openshift-cluster/tasks/launch_instances.yml2
-rw-r--r--playbooks/gce/openshift-cluster/terminate.yml2
-rw-r--r--playbooks/gce/openshift-cluster/update.yml2
-rw-r--r--playbooks/gce/openshift-cluster/vars.yml4
7 files changed, 9 insertions, 9 deletions
diff --git a/playbooks/gce/openshift-cluster/config.yml b/playbooks/gce/openshift-cluster/config.yml
index 45150a67f..d1aa31bc8 100644
--- a/playbooks/gce/openshift-cluster/config.yml
+++ b/playbooks/gce/openshift-cluster/config.yml
@@ -4,7 +4,7 @@
- ../../gce/openshift-cluster/vars.yml
- ../../gce/openshift-cluster/cluster_hosts.yml
vars:
- g_ssh_user: "{{ lookup('env', 'gce_ssh_user') | default(deployment_vars[deployment_type].ssh_user, true) }}"
+ g_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
g_sudo: "{{ deployment_vars[deployment_type].sudo }}"
g_nodeonmaster: true
openshift_cluster_id: "{{ cluster_id }}"
diff --git a/playbooks/gce/openshift-cluster/list.yml b/playbooks/gce/openshift-cluster/list.yml
index c37ddba9a..f3004ede9 100644
--- a/playbooks/gce/openshift-cluster/list.yml
+++ b/playbooks/gce/openshift-cluster/list.yml
@@ -14,7 +14,7 @@
- add_host:
name: "{{ item }}"
groups: oo_list_hosts
- ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user | default(ansible_ssh_user, true) }}"
+ ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
with_items: groups[scratch_group] | default([], true) | difference(['localhost']) | difference(groups.status_terminated | default([], true))
diff --git a/playbooks/gce/openshift-cluster/service.yml b/playbooks/gce/openshift-cluster/service.yml
index 8925de4cb..914f38c1f 100644
--- a/playbooks/gce/openshift-cluster/service.yml
+++ b/playbooks/gce/openshift-cluster/service.yml
@@ -14,14 +14,14 @@
- add_host:
name: "{{ item }}"
groups: g_service_nodes
- ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user | default(ansible_ssh_user, true) }}"
+ ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
with_items: "{{ node_hosts | default([]) | difference(['localhost']) | difference(groups.status_terminated) }}"
- add_host:
name: "{{ item }}"
groups: g_service_masters
- ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user | default(ansible_ssh_user, true) }}"
+ ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
with_items: "{{ master_hosts | default([]) | difference(['localhost']) | difference(groups.status_terminated) }}"
diff --git a/playbooks/gce/openshift-cluster/tasks/launch_instances.yml b/playbooks/gce/openshift-cluster/tasks/launch_instances.yml
index e06b1e077..8ebf71cd4 100644
--- a/playbooks/gce/openshift-cluster/tasks/launch_instances.yml
+++ b/playbooks/gce/openshift-cluster/tasks/launch_instances.yml
@@ -38,7 +38,7 @@
add_host:
hostname: "{{ item.name }}"
ansible_ssh_host: "{{ item.public_ip }}"
- ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user | default(ansible_ssh_user, true) }}"
+ ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
groups: "{{ item.tags | oo_prepend_strings_in_list('tag_') | join(',') }}"
gce_public_ip: "{{ item.public_ip }}"
diff --git a/playbooks/gce/openshift-cluster/terminate.yml b/playbooks/gce/openshift-cluster/terminate.yml
index faa46c0d6..94b4ab14b 100644
--- a/playbooks/gce/openshift-cluster/terminate.yml
+++ b/playbooks/gce/openshift-cluster/terminate.yml
@@ -10,7 +10,7 @@
- add_host:
name: "{{ item }}"
groups: oo_hosts_to_terminate
- ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user | default(ansible_ssh_user, true) }}"
+ ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
with_items: (groups['tag_clusterid-' ~ cluster_id] | default([])) | difference(['localhost'])
diff --git a/playbooks/gce/openshift-cluster/update.yml b/playbooks/gce/openshift-cluster/update.yml
index dadceae58..2dc540978 100644
--- a/playbooks/gce/openshift-cluster/update.yml
+++ b/playbooks/gce/openshift-cluster/update.yml
@@ -12,7 +12,7 @@
add_host:
name: "{{ item }}"
groups: oo_hosts_to_update
- ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user | default(ansible_ssh_user, true) }}"
+ ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
with_items: "{{ g_all_hosts | default([]) }}"
diff --git a/playbooks/gce/openshift-cluster/vars.yml b/playbooks/gce/openshift-cluster/vars.yml
index d0c8a090f..1ae73fd68 100644
--- a/playbooks/gce/openshift-cluster/vars.yml
+++ b/playbooks/gce/openshift-cluster/vars.yml
@@ -4,14 +4,14 @@ debug_level: 2
deployment_rhel7_ent_base:
image: rhel-7
machine_type: n1-standard-1
- ssh_user:
+ ssh_user: "{{ lookup('env', 'gce_ssh_user') | default(ansible_ssh_user, true) }}"
sudo: yes
deployment_vars:
origin:
image: centos-7
machine_type: n1-standard-1
- ssh_user: "{{ ansible_ssh_user }}"
+ ssh_user: "{{ lookup('env', 'gce_ssh_user') | default(ansible_ssh_user, true) }}"
sudo: yes
online:
image: libra-rhel7