summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--README_AEP.md2
-rw-r--r--openshift-ansible.spec2
-rw-r--r--playbooks/aws/openshift-cluster/config.yml2
-rw-r--r--playbooks/byo/openshift-cluster/config.yml2
-rw-r--r--playbooks/common/openshift-cluster/evaluate_groups.yml2
-rw-r--r--playbooks/gce/openshift-cluster/config.yml2
-rw-r--r--playbooks/libvirt/openshift-cluster/config.yml2
-rw-r--r--playbooks/openstack/openshift-cluster/config.yml2
-rw-r--r--roles/openshift_facts/tasks/main.yml6
-rw-r--r--roles/openshift_hosted/tasks/registry/storage/object_storage.yml6
l---------roles/openshift_hosted/tasks/registry/storage/registry_config.j21
l---------roles/openshift_hosted/tasks/registry/storage/registry_config_secret.j21
-rw-r--r--roles/openshift_hosted/tasks/router/router.yml11
14 files changed, 26 insertions, 19 deletions
diff --git a/README.md b/README.md
index 6d38c9945..4fa0286a8 100644
--- a/README.md
+++ b/README.md
@@ -11,11 +11,11 @@ they may in the future.
- Install base dependencies:
- Fedora:
```
- dnf install -y ansible-1.9.4 pyOpenSSL python-cryptography
+ dnf install -y ansible-2.1.0.0 pyOpenSSL python-cryptography
```
- OSX:
```
- # Install ansible 1.9.4 and python 2
+ # Install ansible 2.1.0.0 and python 2
brew install ansible python
```
- Setup for a specific cloud:
diff --git a/README_AEP.md b/README_AEP.md
index 1b926f2ab..c588ebbd3 100644
--- a/README_AEP.md
+++ b/README_AEP.md
@@ -10,7 +10,7 @@
* [Overriding detected ip addresses and hostnames](#overriding-detected-ip-addresses-and-hostnames)
## Requirements
-* ansible 1.9.4
+* ansible 2.1.0.0
* Available in Fedora channels
* Available for EL with EPEL and Optional channel
* One or more RHEL 7.1 VMs
diff --git a/openshift-ansible.spec b/openshift-ansible.spec
index 822070e43..f70193367 100644
--- a/openshift-ansible.spec
+++ b/openshift-ansible.spec
@@ -13,7 +13,7 @@ URL: https://github.com/openshift/openshift-ansible
Source0: https://github.com/openshift/openshift-ansible/archive/%{commit}/%{name}-%{version}.tar.gz
BuildArch: noarch
-Requires: ansible >= 1.9.4
+Requires: ansible >= 2.1.0.0
Requires: python2
Requires: openshift-ansible-docs = %{version}-%{release}
diff --git a/playbooks/aws/openshift-cluster/config.yml b/playbooks/aws/openshift-cluster/config.yml
index 71ce9e787..d6b5700b0 100644
--- a/playbooks/aws/openshift-cluster/config.yml
+++ b/playbooks/aws/openshift-cluster/config.yml
@@ -6,7 +6,7 @@
- add_host:
name: "{{ item }}"
groups: l_oo_all_hosts
- with_items: g_all_hosts
+ with_items: "{{ g_all_hosts | default([]) }}"
- hosts: l_oo_all_hosts
gather_facts: no
diff --git a/playbooks/byo/openshift-cluster/config.yml b/playbooks/byo/openshift-cluster/config.yml
index c5479d098..3477b2dc4 100644
--- a/playbooks/byo/openshift-cluster/config.yml
+++ b/playbooks/byo/openshift-cluster/config.yml
@@ -8,7 +8,7 @@
- add_host:
name: "{{ item }}"
groups: l_oo_all_hosts
- with_items: g_all_hosts
+ with_items: "{{ g_all_hosts | default([]) }}"
- hosts: l_oo_all_hosts
gather_facts: no
diff --git a/playbooks/common/openshift-cluster/evaluate_groups.yml b/playbooks/common/openshift-cluster/evaluate_groups.yml
index c5273b08f..3fb42a7fa 100644
--- a/playbooks/common/openshift-cluster/evaluate_groups.yml
+++ b/playbooks/common/openshift-cluster/evaluate_groups.yml
@@ -35,7 +35,7 @@
groups: oo_all_hosts
ansible_ssh_user: "{{ g_ssh_user | default(omit) }}"
ansible_become: "{{ g_sudo | default(omit) }}"
- with_items: g_all_hosts | default([])
+ with_items: "{{ g_all_hosts | default([]) }}"
- name: Evaluate oo_masters
add_host:
diff --git a/playbooks/gce/openshift-cluster/config.yml b/playbooks/gce/openshift-cluster/config.yml
index 97572b930..8e46c5919 100644
--- a/playbooks/gce/openshift-cluster/config.yml
+++ b/playbooks/gce/openshift-cluster/config.yml
@@ -9,7 +9,7 @@
groups: l_oo_all_hosts
ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
ansible_become: "{{ deployment_vars[deployment_type].become }}"
- with_items: g_all_hosts
+ with_items: "{{ g_all_hosts | default([]) }}"
- hosts: l_oo_all_hosts
gather_facts: no
diff --git a/playbooks/libvirt/openshift-cluster/config.yml b/playbooks/libvirt/openshift-cluster/config.yml
index 21d82f422..a28e59a87 100644
--- a/playbooks/libvirt/openshift-cluster/config.yml
+++ b/playbooks/libvirt/openshift-cluster/config.yml
@@ -10,7 +10,7 @@
- add_host:
name: "{{ item }}"
groups: l_oo_all_hosts
- with_items: g_all_hosts
+ with_items: "{{ g_all_hosts | default([]) }}"
- hosts: l_oo_all_hosts
gather_facts: no
diff --git a/playbooks/openstack/openshift-cluster/config.yml b/playbooks/openstack/openshift-cluster/config.yml
index 6fff31826..1366c83ca 100644
--- a/playbooks/openstack/openshift-cluster/config.yml
+++ b/playbooks/openstack/openshift-cluster/config.yml
@@ -7,7 +7,7 @@
- add_host:
name: "{{ item }}"
groups: l_oo_all_hosts
- with_items: g_all_hosts
+ with_items: "{{ g_all_hosts | default([]) }}"
- hosts: l_oo_all_hosts
gather_facts: no
diff --git a/roles/openshift_facts/tasks/main.yml b/roles/openshift_facts/tasks/main.yml
index c3723672d..2aca35ce1 100644
--- a/roles/openshift_facts/tasks/main.yml
+++ b/roles/openshift_facts/tasks/main.yml
@@ -1,8 +1,8 @@
---
-- name: Verify Ansible version is greater than or equal to 1.9.4
+- name: Verify Ansible version is greater than or equal to 2.1.0.0
fail:
- msg: "Unsupported ansible version: {{ ansible_version }} found"
- when: not ansible_version.full | version_compare('1.9.4', 'ge')
+ msg: "Unsupported ansible version: {{ ansible_version.full }} found"
+ when: not ansible_version.full | version_compare('2.1.0.0', 'ge')
- name: Detecting Operating System
stat:
diff --git a/roles/openshift_hosted/tasks/registry/storage/object_storage.yml b/roles/openshift_hosted/tasks/registry/storage/object_storage.yml
index 9db67ecc6..7b1b3f6ff 100644
--- a/roles/openshift_hosted/tasks/registry/storage/object_storage.yml
+++ b/roles/openshift_hosted/tasks/registry/storage/object_storage.yml
@@ -24,10 +24,10 @@
failed_when: false
- set_fact:
- registry_config: "{{ lookup('template', '../templates/registry_config.j2') | b64encode }}"
+ registry_config: "{{ lookup('template', 'registry_config.j2') | b64encode }}"
- set_fact:
- registry_config_secret: "{{ lookup('template', '../templates/registry_config_secret.j2') | from_yaml }}"
+ registry_config_secret: "{{ lookup('template', 'registry_config_secret.j2') | from_yaml }}"
- set_fact:
same_storage_provider: "{{ (secrets.stdout|from_json)['metadata']['annotations']['provider'] | default(none) == openshift.hosted.registry.storage.provider }}"
@@ -111,4 +111,4 @@
--config={{ openshift_hosted_kubeconfig }}
--namespace={{ openshift.hosted.registry.namespace | default('default') }}
deploy dc/docker-registry --latest
- when: secrets.rc == 0 and update_config_secret.rc == 0 and same_storage_provider | bool
+ when: secrets.rc == 0 and not update_config_secret | skipped and update_config_secret.rc == 0 and same_storage_provider | bool
diff --git a/roles/openshift_hosted/tasks/registry/storage/registry_config.j2 b/roles/openshift_hosted/tasks/registry/storage/registry_config.j2
new file mode 120000
index 000000000..f3e82ad4f
--- /dev/null
+++ b/roles/openshift_hosted/tasks/registry/storage/registry_config.j2
@@ -0,0 +1 @@
+../../../templates/registry_config.j2 \ No newline at end of file
diff --git a/roles/openshift_hosted/tasks/registry/storage/registry_config_secret.j2 b/roles/openshift_hosted/tasks/registry/storage/registry_config_secret.j2
new file mode 120000
index 000000000..b9e82c1ea
--- /dev/null
+++ b/roles/openshift_hosted/tasks/registry/storage/registry_config_secret.j2
@@ -0,0 +1 @@
+../../../templates/registry_config_secret.j2 \ No newline at end of file
diff --git a/roles/openshift_hosted/tasks/router/router.yml b/roles/openshift_hosted/tasks/router/router.yml
index c011db762..95f0617dc 100644
--- a/roles/openshift_hosted/tasks/router/router.yml
+++ b/roles/openshift_hosted/tasks/router/router.yml
@@ -9,10 +9,15 @@
module: slurp
src: "{{ item }}"
register: openshift_router_certificate_output
+ # Defaulting dictionary keys to none to avoid deprecation warnings
+ # (future fatal errors) during template evaluation. Dictionary keys
+ # won't be accessed unless openshift_hosted_router_certificate is
+ # defined and has all keys (certfile, keyfile, cafile) which we
+ # check above.
with_items:
- - "{{ openshift_hosted_router_certificate.certfile }}"
- - "{{ openshift_hosted_router_certificate.keyfile }}"
- - "{{ openshift_hosted_router_certificate.cafile }}"
+ - "{{ (openshift_hosted_router_certificate | default({'certfile':none})).certfile }}"
+ - "{{ (openshift_hosted_router_certificate | default({'keyfile':none})).keyfile }}"
+ - "{{ (openshift_hosted_router_certificate | default({'cafile':none})).cafile }}"
when: openshift_hosted_router_certificate is defined
- name: Persist certificate contents