summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorChengcheng Mu <chengcheng.mu@amadeus.com>2015-10-09 16:27:25 +0200
committerChengcheng Mu <chengcheng.mu@amadeus.com>2015-10-09 16:27:25 +0200
commita8171a639bd4500f30e72233587e9f6335202438 (patch)
tree2b44aff20d9f82e0a8af124f4d45a4632677e328 /playbooks
parent46f10c87930747d7e10cfc2c3b71ea68da647135 (diff)
downloadopenshift-a8171a639bd4500f30e72233587e9f6335202438.tar.gz
openshift-a8171a639bd4500f30e72233587e9f6335202438.tar.bz2
openshift-a8171a639bd4500f30e72233587e9f6335202438.tar.xz
openshift-a8171a639bd4500f30e72233587e9f6335202438.zip
Adding second param. true to many default filters
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/common/openshift-cluster/set_infra_launch_facts_tasks.yml2
-rw-r--r--playbooks/gce/openshift-cluster/list.yml2
-rw-r--r--playbooks/gce/openshift-cluster/tasks/launch_instances.yml6
-rw-r--r--playbooks/gce/openshift-cluster/terminate.yml4
4 files changed, 7 insertions, 7 deletions
diff --git a/playbooks/common/openshift-cluster/set_infra_launch_facts_tasks.yml b/playbooks/common/openshift-cluster/set_infra_launch_facts_tasks.yml
index 0fd53eb7d..01d70a1a6 100644
--- a/playbooks/common/openshift-cluster/set_infra_launch_facts_tasks.yml
+++ b/playbooks/common/openshift-cluster/set_infra_launch_facts_tasks.yml
@@ -10,6 +10,6 @@
with_sequence: count={{ number_infra }}
- set_fact:
- infra_names: "{{ infra_names_output.results | default([])
+ infra_names: "{{ infra_names_output.results | default([], true)
| oo_collect('ansible_facts')
| oo_collect('scratch_name') }}"
diff --git a/playbooks/gce/openshift-cluster/list.yml b/playbooks/gce/openshift-cluster/list.yml
index f5f89baf0..53b2b9a5e 100644
--- a/playbooks/gce/openshift-cluster/list.yml
+++ b/playbooks/gce/openshift-cluster/list.yml
@@ -14,7 +14,7 @@
groups: oo_list_hosts
ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user | default(ansible_ssh_user, true) }}"
ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
- with_items: groups[scratch_group] | default([]) | difference(['localhost']) | difference(groups.status_terminated | default([]))
+ with_items: groups[scratch_group] | default([], true) | difference(['localhost']) | difference(groups.status_terminated | default([], true))
- name: List instance(s)
hosts: oo_list_hosts
diff --git a/playbooks/gce/openshift-cluster/tasks/launch_instances.yml b/playbooks/gce/openshift-cluster/tasks/launch_instances.yml
index b07982305..e300b5b5a 100644
--- a/playbooks/gce/openshift-cluster/tasks/launch_instances.yml
+++ b/playbooks/gce/openshift-cluster/tasks/launch_instances.yml
@@ -32,11 +32,11 @@
groups: "{{ item.tags | oo_prepend_strings_in_list('tag_') | join(',') }}"
gce_public_ip: "{{ item.public_ip }}"
gce_private_ip: "{{ item.private_ip }}"
- with_items: gce.instance_data | default([])
+ with_items: gce.instance_data | default([], true)
- name: Wait for ssh
wait_for: port=22 host={{ item.name }}
- with_items: gce.instance_data | default([])
+ with_items: gce.instance_data | default([], true)
- name: Wait for user setup
command: "ssh -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o ConnectTimeout=10 -o UserKnownHostsFile=/dev/null {{ hostvars[item.name].ansible_ssh_user }}@{{ item.public_ip }} echo {{ hostvars[item.name].ansible_ssh_user }} user is setup"
@@ -44,4 +44,4 @@
until: result.rc == 0
retries: 30
delay: 5
- with_items: gce.instance_data | default([])
+ with_items: gce.instance_data | default([], true)
diff --git a/playbooks/gce/openshift-cluster/terminate.yml b/playbooks/gce/openshift-cluster/terminate.yml
index f705745d9..e20e0a8bc 100644
--- a/playbooks/gce/openshift-cluster/terminate.yml
+++ b/playbooks/gce/openshift-cluster/terminate.yml
@@ -12,7 +12,7 @@
groups: oo_hosts_to_terminate
ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user | default(ansible_ssh_user, true) }}"
ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
- with_items: groups[scratch_group] | default([]) | difference(['localhost']) | difference(groups.status_terminated | default([]))
+ with_items: groups[scratch_group] | default([], true) | difference(['localhost']) | difference(groups.status_terminated | default([], true))
- name: Unsubscribe VMs
hosts: oo_hosts_to_terminate
@@ -42,7 +42,7 @@
pem_file: "{{ lookup('env', 'gce_service_account_pem_file_path') }}"
project_id: "{{ lookup('env', 'gce_project_id') }}"
zone: "{{ lookup('env', 'zone') }}"
- with_items: groups['oo_hosts_to_terminate'] | default([])
+ with_items: groups['oo_hosts_to_terminate'] | default([], true)
when: item is defined
#- include: ../openshift-node/terminate.yml