[CORD-2874]
Fix deprecation warnings raised by Ansible 2.5
Change-Id: Icb607d267af2771b046b46399ce5f0d182f629ab
diff --git a/roles/ansible-install/tasks/main.yml b/roles/ansible-install/tasks/main.yml
index fc66b18..40831ed 100644
--- a/roles/ansible-install/tasks/main.yml
+++ b/roles/ansible-install/tasks/main.yml
@@ -1,4 +1,4 @@
-
+---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
----
# file: ansible-install/tasks/main.yml
- name: Install prerequisites for using PPA repos
@@ -33,7 +31,7 @@
with_items:
- "{{ ansible_apt_repo | default('ppa:ansible/ansible') }}"
register: result
- until: result | success
+ until: result is success
retries: 3
delay: 10
@@ -44,4 +42,4 @@
update_cache: yes
cache_valid_time: 3600
tags:
- - skip_ansible_lint # ansible-lint complains about latest, need this as distro provided 1.5.x version may be used if already installed.
\ No newline at end of file
+ - skip_ansible_lint # ansible-lint complains about latest, need this as distro provided 1.5.x version may be used if already installed.
diff --git a/roles/cloudlab-prep/tasks/main.yml b/roles/cloudlab-prep/tasks/main.yml
index b4fecfa..5f34ba7 100644
--- a/roles/cloudlab-prep/tasks/main.yml
+++ b/roles/cloudlab-prep/tasks/main.yml
@@ -1,4 +1,4 @@
-
+---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
----
# roles/cloudlab-prep/tasks/main.yml
- name: create directories to mount extra filesystems
@@ -23,14 +21,13 @@
state=directory
with_items: "{{ cloudlab_extrafs }}"
-
# FIXME: does not create lost+found, -q makes it fail without error...
- name: Set up extra disk space
command: /usr/testbed/bin/mkextrafs -r {{ item.dev }} -qf {{ item.mount }}
creates={{ item.mount }}/lost+found
with_items: "{{ cloudlab_extrafs }}"
register: result
- until: result | success
+ until: result is success
retries: 3
delay: 5
diff --git a/roles/common-prep/tasks/main.yml b/roles/common-prep/tasks/main.yml
index 7874b28..1ae5031 100644
--- a/roles/common-prep/tasks/main.yml
+++ b/roles/common-prep/tasks/main.yml
@@ -1,4 +1,4 @@
-
+---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
----
# file: common-prep/tasks/main.yml
- name: Upgrade system to current using apt
diff --git a/roles/compute-node-enable/tasks/main.yml b/roles/compute-node-enable/tasks/main.yml
index 5a618eb..beec7db 100644
--- a/roles/compute-node-enable/tasks/main.yml
+++ b/roles/compute-node-enable/tasks/main.yml
@@ -25,7 +25,7 @@
body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}"
status_code: 200
register: result
- until: result | success
+ until: result is success
retries: 50
delay: 5
with_items:
@@ -48,7 +48,7 @@
body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}"
status_code: 200
register: result
- until: result | success
+ until: result is success
retries: 50
delay: 5
with_items:
diff --git a/roles/fabric-refresh/tasks/main.yml b/roles/fabric-refresh/tasks/main.yml
index f069814..4ad7709 100644
--- a/roles/fabric-refresh/tasks/main.yml
+++ b/roles/fabric-refresh/tasks/main.yml
@@ -1,3 +1,4 @@
+---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -54,7 +55,7 @@
body: "{{ slurpfile['content'] | b64decode }}"
status_code: 200
register: result
- until: result | success
+ until: result is success
retries: 5
delay: 5
diff --git a/roles/glance-images/tasks/main.yml b/roles/glance-images/tasks/main.yml
index 29fceb0..7bd4a0e 100644
--- a/roles/glance-images/tasks/main.yml
+++ b/roles/glance-images/tasks/main.yml
@@ -1,4 +1,4 @@
-
+---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
----
# glance-images/tasks/main.yml
- name: Make images directory
@@ -35,7 +33,7 @@
dest: "{{ image_dir }}/{{ item.name }}.qcow2"
with_items: "{{ xos_images }}"
register: glance_vm_result
- until: glance_vm_result|success
+ until: glance_vm_result is success
retries: 5
delay: 10
diff --git a/roles/head-prep/tasks/main.yml b/roles/head-prep/tasks/main.yml
index 3fcb40a..4bb2bca 100644
--- a/roles/head-prep/tasks/main.yml
+++ b/roles/head-prep/tasks/main.yml
@@ -30,7 +30,7 @@
with_items:
- "{{ ansible_apt_repo | default('ppa:ansible/ansible') }}"
register: result
- until: result | success
+ until: result is success
retries: 3
delay: 10
diff --git a/roles/java-oracle/tasks/main.yml b/roles/java-oracle/tasks/main.yml
index 4c0d4b9..0120a1f 100644
--- a/roles/java-oracle/tasks/main.yml
+++ b/roles/java-oracle/tasks/main.yml
@@ -1,4 +1,4 @@
-
+---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
----
# java-oracle/tasks/main
- name: Install add-apt-repository
@@ -33,7 +31,7 @@
apt_repository:
repo: 'ppa:webupd8team/java'
register: result
- until: result | success
+ until: result is success
retries: 3
delay: 10
diff --git a/roles/juju-compute-setup/tasks/main.yml b/roles/juju-compute-setup/tasks/main.yml
index dff82cd..d24fe0e 100644
--- a/roles/juju-compute-setup/tasks/main.yml
+++ b/roles/juju-compute-setup/tasks/main.yml
@@ -1,4 +1,4 @@
-
+---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
----
# roles/juju-compute-setup/main/tasks.yml
# Code for this is in library/juju_facts.py
@@ -77,7 +75,7 @@
- name: Verify that the nodes appear in nova
action: shell bash -c "source /opt/cord_profile/admin-openrc.sh; nova hypervisor-list | grep '{{ item }}'"
register: result
- until: result | success
+ until: result is success
retries: 20
delay: 15
with_items: "{{ groups['compute'] }}"
diff --git a/roles/juju-finish/tasks/main.yml b/roles/juju-finish/tasks/main.yml
index 54828b0..9d24c37 100644
--- a/roles/juju-finish/tasks/main.yml
+++ b/roles/juju-finish/tasks/main.yml
@@ -1,4 +1,4 @@
-
+---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,15 +13,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
----
# juju-finish/tasks/main.yml
# run another time, so services will be in juju_services list
- name: Obtain Juju Facts after service creation
juju_facts:
register: result
- until: result | success
+ until: result is success
retries: 3
delay: 15
diff --git a/roles/juju-setup/tasks/main.yml b/roles/juju-setup/tasks/main.yml
index e481577..be45acf 100644
--- a/roles/juju-setup/tasks/main.yml
+++ b/roles/juju-setup/tasks/main.yml
@@ -1,4 +1,4 @@
-
+---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
----
# roles/juju-setup/main/tasks.yml
- name: Initialize Juju
@@ -37,7 +35,7 @@
- name: Obtain Juju Facts for creating machines
juju_facts:
register: result
- until: result | success
+ until: result is success
retries: 40
delay: 15
@@ -70,7 +68,7 @@
command: "juju add-machine ssh:{{ item }}"
with_items: "{{ head_lxd_list | map(attribute='service') | list | reject('undefined') | map('format_string', '%s.'~site_suffix ) | difference( juju_machines.keys() ) }}"
register: result
- until: result | success
+ until: result is success
retries: 3
delay: 10
@@ -78,7 +76,7 @@
- name: Obtain Juju Facts after machine creation
juju_facts:
register: result
- until: result | success
+ until: result is success
retries: 3
delay: 15
diff --git a/roles/lxd-finish/tasks/main.yml b/roles/lxd-finish/tasks/main.yml
index d7b7623..ac6657d 100644
--- a/roles/lxd-finish/tasks/main.yml
+++ b/roles/lxd-finish/tasks/main.yml
@@ -1,4 +1,4 @@
-
+---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
----
# lxd-finish/tasks/main.yml
- name: Verify that we can log into every container
@@ -30,7 +28,7 @@
-m uri
-a "url=http://opencord.org validate_certs=no"
register: result
- until: result|success
+ until: result is success
retries: 3
delay: 5
tags:
diff --git a/roles/test-client-install/tasks/main.yml b/roles/test-client-install/tasks/main.yml
index dd4f467..ffae72e 100644
--- a/roles/test-client-install/tasks/main.yml
+++ b/roles/test-client-install/tasks/main.yml
@@ -62,7 +62,7 @@
name: testclient
state: stopped
register: result
- until: result | success
+ until: result is success
retries: 3
delay: 10
diff --git a/roles/test-exampleservice/tasks/main.yml b/roles/test-exampleservice/tasks/main.yml
index ed558b6..99a1655 100644
--- a/roles/test-exampleservice/tasks/main.yml
+++ b/roles/test-exampleservice/tasks/main.yml
@@ -26,7 +26,7 @@
body: "{{ lookup('file', head_cord_profile_dir + '/test-exampleservice.yaml' ) }}"
status_code: 200
register: result
- until: result | success
+ until: result is success
retries: 50
delay: 5
tags:
@@ -35,7 +35,7 @@
- name: Wait for ExampleService VM to come up
shell: bash -c "source /opt/cord_profile/admin-openrc.sh; nova list --all-tenants|grep 'exampleservice.*ACTIVE' > /dev/null"
register: result
- until: result | success
+ until: result is success
retries: 10
delay: 60
tags:
@@ -68,7 +68,7 @@
- name: Wait for Apache to come up inside VM
shell: ssh -o ProxyCommand="ssh -W %h:%p -l ubuntu {{ node_name.stdout }}" ubuntu@{{ mgmt_ip.stdout }} "ls /var/run/apache2/apache2.pid" > /dev/null
register: result
- until: result | success
+ until: result is success
retries: 20
delay: 60
tags:
@@ -84,7 +84,7 @@
become: yes
shell: lxc exec testclient -- route | grep default | grep "eth0.222.111"
register: result
- until: result | success
+ until: result is success
retries: 20
delay: 30
tags:
diff --git a/roles/test-subscriber-enable/tasks/main.yml b/roles/test-subscriber-enable/tasks/main.yml
index 305bf48..0149cf8 100644
--- a/roles/test-subscriber-enable/tasks/main.yml
+++ b/roles/test-subscriber-enable/tasks/main.yml
@@ -25,7 +25,7 @@
body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}"
status_code: 200
register: result
- until: result | success
+ until: result is success
retries: 50
delay: 5
with_items:
diff --git a/roles/test-vsg/tasks/main.yml b/roles/test-vsg/tasks/main.yml
index a26fc96..4515bd0 100644
--- a/roles/test-vsg/tasks/main.yml
+++ b/roles/test-vsg/tasks/main.yml
@@ -20,7 +20,7 @@
- name: Wait for vSG VM to come up
shell: bash -c "source /opt/cord_profile/admin-openrc.sh; nova list --all-tenants|grep 'vsg.*ACTIVE' > /dev/null"
register: result
- until: result | success
+ until: result is success
retries: 10
delay: 60
tags:
@@ -47,7 +47,7 @@
- name: Wait for Docker container inside VM to come up
shell: ssh -o ProxyCommand="ssh -W %h:%p -l ubuntu {{ node_name.stdout }}" ubuntu@{{ mgmt_ip.stdout }} "sudo docker ps|grep 'vsg\|vcpe'" > /dev/null
register: result
- until: result | success
+ until: result is success
retries: 40
delay: 30
tags:
@@ -63,7 +63,7 @@
become: yes
shell: lxc exec testclient -- route | grep default | grep "eth0.222.111"
register: result
- until: result | success
+ until: result is success
retries: 20
delay: 30
tags:
diff --git a/roles/xos-config/tasks/main.yml b/roles/xos-config/tasks/main.yml
index 8c8ee38..00454b5 100644
--- a/roles/xos-config/tasks/main.yml
+++ b/roles/xos-config/tasks/main.yml
@@ -25,7 +25,7 @@
body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}"
status_code: 200
register: result
- until: result | success
+ until: result is success
retries: 50
delay: 5
with_items:
@@ -42,7 +42,7 @@
body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}"
status_code: 200
register: result
- until: result | success
+ until: result is success
retries: 50
delay: 5
with_items:
@@ -58,7 +58,7 @@
body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}"
status_code: 200
register: result
- until: result | success
+ until: result is success
retries: 50
delay: 5
with_items: "{{ xos_tosca_config_templates + xos_new_tosca_config_templates }}"