You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ra...@apache.org on 2018/03/26 11:57:18 UTC
[incubator-openwhisk] branch master updated: Ansible 2.4 deprecates ‘include’ in favor of ‘import_*’ and ‘include_tasks’ (#3457)
This is an automated email from the ASF dual-hosted git repository.
rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new e2c1004 Ansible 2.4 deprecates ‘include’ in favor of ‘import_*’ and ‘include_tasks’ (#3457)
e2c1004 is described below
commit e2c1004c2ea36b217d39663f6a3cc2941caa0008
Author: Jonathan Springer <jo...@gmail.com>
AuthorDate: Mon Mar 26 07:57:15 2018 -0400
Ansible 2.4 deprecates ‘include’ in favor of ‘import_*’ and ‘include_tasks’ (#3457)
* Replace include with import_playbook, import_tasks, and include_tasks to eliminate ansible 2.4 warnings
* Remove nested import from initdb.yml and wipeDatabase.yml
---
ansible/initdb.yml | 2 +-
ansible/logs.yml | 2 +-
ansible/openwhisk.yml | 10 +++++-----
ansible/postdeploy.yml | 6 +++---
ansible/properties.yml | 2 +-
ansible/provision_env_dist.yml | 2 +-
ansible/recreateDesignDocs.yml | 2 +-
ansible/registry.yml | 4 ++--
ansible/roles/apigateway/tasks/main.yml | 4 ++--
ansible/roles/cli-install/tasks/main.yml | 4 ++--
ansible/roles/cli/tasks/main.yml | 4 ++--
ansible/roles/controller/tasks/deploy.yml | 4 ++--
ansible/roles/controller/tasks/main.yml | 4 ++--
ansible/roles/couchdb/tasks/main.yml | 4 ++--
ansible/roles/docker/tasks/main.yml | 4 ++--
ansible/roles/invoker/tasks/deploy.yml | 4 ++--
ansible/roles/invoker/tasks/main.yml | 4 ++--
ansible/roles/kafka/tasks/main.yml | 4 ++--
ansible/roles/nginx/tasks/main.yml | 4 ++--
ansible/roles/prereq/tasks/main.yml | 4 ++--
ansible/roles/redis/tasks/main.yml | 4 ++--
ansible/roles/registry/tasks/main.yml | 4 ++--
ansible/roles/routemgmt/tasks/main.yml | 4 ++--
ansible/roles/whiskhost/tasks/deploy.yml | 4 ++--
ansible/roles/whiskhost/tasks/main.yml | 4 ++--
ansible/roles/zookeeper/tasks/main.yml | 4 ++--
ansible/routemgmt.yml | 2 +-
ansible/tasks/initdb.yml | 6 +++---
ansible/tasks/recreateViews.yml | 4 ++--
ansible/tasks/wipeDatabase.yml | 6 +++---
ansible/wipe.yml | 2 +-
31 files changed, 61 insertions(+), 61 deletions(-)
diff --git a/ansible/initdb.yml b/ansible/initdb.yml
index 9579f79..e14aac3 100644
--- a/ansible/initdb.yml
+++ b/ansible/initdb.yml
@@ -4,4 +4,4 @@
- hosts: ansible
tasks:
- - include: tasks/initdb.yml
+ - include_tasks: tasks/initdb.yml
diff --git a/ansible/logs.yml b/ansible/logs.yml
index 545e69b..67066e6d 100644
--- a/ansible/logs.yml
+++ b/ansible/logs.yml
@@ -1,7 +1,7 @@
---
# This playbook is used for utilities around logs
-- include: properties.yml
+- import_playbook: properties.yml
- hosts: ansible
tasks:
diff --git a/ansible/openwhisk.yml b/ansible/openwhisk.yml
index 58263b6..e5dc7d5 100644
--- a/ansible/openwhisk.yml
+++ b/ansible/openwhisk.yml
@@ -3,12 +3,12 @@
# It assumes you have already set up your database with the respective db provider playbook (currently cloudant.yml or couchdb.yml)
# It assumes that wipe.yml have being deployed at least once
-- include: kafka.yml
+- import_playbook: kafka.yml
-- include: controller.yml
+- import_playbook: controller.yml
-- include: invoker.yml
+- import_playbook: invoker.yml
-- include: edge.yml
+- import_playbook: edge.yml
-- include: routemgmt.yml
+- import_playbook: routemgmt.yml
diff --git a/ansible/postdeploy.yml b/ansible/postdeploy.yml
index 099c3a0..4bbb1ea 100644
--- a/ansible/postdeploy.yml
+++ b/ansible/postdeploy.yml
@@ -1,10 +1,10 @@
---
# This playbook installs additional packages after whisk has been deployed.
-- include: properties.yml
+- import_playbook: properties.yml
- hosts: ansible
tasks:
- - include: tasks/installOpenwhiskCatalog.yml
+ - include_tasks: tasks/installOpenwhiskCatalog.yml
when: (mode == "deploy")
- with_dict: "{{ catalog_repos }}"
\ No newline at end of file
+ with_dict: "{{ catalog_repos }}"
diff --git a/ansible/properties.yml b/ansible/properties.yml
index 7c0acd1..014a99a 100644
--- a/ansible/properties.yml
+++ b/ansible/properties.yml
@@ -3,5 +3,5 @@
- hosts: ansible
tasks:
- - include: tasks/writeWhiskProperties.yml
+ - import_tasks: tasks/writeWhiskProperties.yml
when: mode == "deploy"
diff --git a/ansible/provision_env_dist.yml b/ansible/provision_env_dist.yml
index 6f42845..9a74dbd 100644
--- a/ansible/provision_env_dist.yml
+++ b/ansible/provision_env_dist.yml
@@ -9,7 +9,7 @@
dest: "{{hosts_dir}}/hosts"
- name: Create instances
- include: boot_instances_dist.yml instance={{item}}
+ import_tasks: boot_instances_dist.yml instance={{item}}
with_items: instances
- meta: refresh_inventory
diff --git a/ansible/recreateDesignDocs.yml b/ansible/recreateDesignDocs.yml
index a5a3017..52c8b44 100644
--- a/ansible/recreateDesignDocs.yml
+++ b/ansible/recreateDesignDocs.yml
@@ -3,5 +3,5 @@
- hosts: ansible
tasks:
- - include: tasks/recreateViews.yml
+ - import_tasks: tasks/recreateViews.yml
when: mode == "deploy"
diff --git a/ansible/registry.yml b/ansible/registry.yml
index f58d379..4c015d0 100644
--- a/ansible/registry.yml
+++ b/ansible/registry.yml
@@ -4,7 +4,7 @@
# Generate cert if needed. Not used currently.
- hosts: ansible
tasks:
- - include: roles/registry/tasks/gencert.yml
+ - import_tasks: roles/registry/tasks/gencert.yml
when: mode == "deploy" and registry.gencert == true
# Deploy registry
@@ -16,5 +16,5 @@
- hosts: all:!ansible
become: true
tasks:
- - include: roles/registry/tasks/publish.yml
+ - import_tasks: roles/registry/tasks/publish.yml
when: mode == "deploy" and registry.gencert
diff --git a/ansible/roles/apigateway/tasks/main.yml b/ansible/roles/apigateway/tasks/main.yml
index bfddaec..7092708 100644
--- a/ansible/roles/apigateway/tasks/main.yml
+++ b/ansible/roles/apigateway/tasks/main.yml
@@ -3,9 +3,9 @@
# In deploy mode it will deploy apigateway.
# In clean mode it will remove the apigateway containers.
-- include: deploy.yml
+- import_tasks: deploy.yml
when: mode == "deploy"
-- include: clean.yml
+- import_tasks: clean.yml
when: mode == "clean"
diff --git a/ansible/roles/cli-install/tasks/main.yml b/ansible/roles/cli-install/tasks/main.yml
index b03b406..94bfb78 100644
--- a/ansible/roles/cli-install/tasks/main.yml
+++ b/ansible/roles/cli-install/tasks/main.yml
@@ -3,8 +3,8 @@
# In deploy mode it will generate a new CLI config, generate a tarball and copy it to nginx.
# In clean mode it will clean the cli.nginxdir
-- include: deploy.yml
+- import_tasks: deploy.yml
when: mode == "deploy"
-- include: clean.yml
+- import_tasks: clean.yml
when: mode == "clean"
diff --git a/ansible/roles/cli/tasks/main.yml b/ansible/roles/cli/tasks/main.yml
index b03b406..94bfb78 100644
--- a/ansible/roles/cli/tasks/main.yml
+++ b/ansible/roles/cli/tasks/main.yml
@@ -3,8 +3,8 @@
# In deploy mode it will generate a new CLI config, generate a tarball and copy it to nginx.
# In clean mode it will clean the cli.nginxdir
-- include: deploy.yml
+- import_tasks: deploy.yml
when: mode == "deploy"
-- include: clean.yml
+- import_tasks: clean.yml
when: mode == "clean"
diff --git a/ansible/roles/controller/tasks/deploy.yml b/ansible/roles/controller/tasks/deploy.yml
index a02cf79..b9e8c78 100644
--- a/ansible/roles/controller/tasks/deploy.yml
+++ b/ansible/roles/controller/tasks/deploy.yml
@@ -1,7 +1,7 @@
---
# This role will install Controller in group 'controllers' in the environment inventory
-- include: docker_login.yml
+- import_tasks: docker_login.yml
- name: get controller index
set_fact:
@@ -71,7 +71,7 @@
become: "{{ controller.dir.become }}"
- name: check, that required databases exist
- include: "{{ openwhisk_home }}/ansible/tasks/db/checkDb.yml"
+ include_tasks: "{{ openwhisk_home }}/ansible/tasks/db/checkDb.yml"
vars:
dbName: "{{ item }}"
with_items:
diff --git a/ansible/roles/controller/tasks/main.yml b/ansible/roles/controller/tasks/main.yml
index 388d458..a3ed3e9 100644
--- a/ansible/roles/controller/tasks/main.yml
+++ b/ansible/roles/controller/tasks/main.yml
@@ -3,8 +3,8 @@
# In deploy mode it will deploy controllers.
# In clean mode it will remove the controller containers.
-- include: deploy.yml
+- import_tasks: deploy.yml
when: mode == "deploy"
-- include: clean.yml
+- import_tasks: clean.yml
when: mode == "clean"
\ No newline at end of file
diff --git a/ansible/roles/couchdb/tasks/main.yml b/ansible/roles/couchdb/tasks/main.yml
index 0eb6ea6..fddf1f9 100644
--- a/ansible/roles/couchdb/tasks/main.yml
+++ b/ansible/roles/couchdb/tasks/main.yml
@@ -3,8 +3,8 @@
# In deploy mode it will start the CouchDB container.
# In clean mode it will remove the CouchDB container.
-- include: deploy.yml
+- import_tasks: deploy.yml
when: mode == "deploy"
-- include: clean.yml
+- import_tasks: clean.yml
when: mode == "clean"
diff --git a/ansible/roles/docker/tasks/main.yml b/ansible/roles/docker/tasks/main.yml
index 668db11..8b492a2 100644
--- a/ansible/roles/docker/tasks/main.yml
+++ b/ansible/roles/docker/tasks/main.yml
@@ -3,8 +3,8 @@
# In deploy mode it will install docker using apt.
# In clean mode it will uninstall docker.
-- include: deploy.yml
+- import_tasks: deploy.yml
when: mode == "deploy"
-- include: clean.yml
+- import_tasks: clean.yml
when: mode == "clean"
diff --git a/ansible/roles/invoker/tasks/deploy.yml b/ansible/roles/invoker/tasks/deploy.yml
index 51867f4..e9302eb 100644
--- a/ansible/roles/invoker/tasks/deploy.yml
+++ b/ansible/roles/invoker/tasks/deploy.yml
@@ -1,7 +1,7 @@
---
# This role installs invokers.
-- include: docker_login.yml
+- import_tasks: docker_login.yml
- name: "pull invoker image with tag {{docker.image.tag}}"
shell: "docker pull {{docker_registry}}{{item}}:{{docker.image.tag}}"
@@ -67,7 +67,7 @@
dest: "{{ invoker.confdir }}/invoker{{ groups['invokers'].index(inventory_hostname) }}"
- name: check, that required databases exist
- include: "{{ openwhisk_home }}/ansible/tasks/db/checkDb.yml"
+ include_tasks: "{{ openwhisk_home }}/ansible/tasks/db/checkDb.yml"
vars:
dbName: "{{ item }}"
with_items:
diff --git a/ansible/roles/invoker/tasks/main.yml b/ansible/roles/invoker/tasks/main.yml
index 32ed7cd..b9d02ca 100644
--- a/ansible/roles/invoker/tasks/main.yml
+++ b/ansible/roles/invoker/tasks/main.yml
@@ -3,8 +3,8 @@
# In deploy mode it will deploy invokers.
# In clean mode it will remove the invoker containers.
-- include: deploy.yml
+- import_tasks: deploy.yml
when: mode == "deploy"
-- include: clean.yml
+- import_tasks: clean.yml
when: mode == "clean"
\ No newline at end of file
diff --git a/ansible/roles/kafka/tasks/main.yml b/ansible/roles/kafka/tasks/main.yml
index 0140e39..5b3f119 100644
--- a/ansible/roles/kafka/tasks/main.yml
+++ b/ansible/roles/kafka/tasks/main.yml
@@ -3,8 +3,8 @@
# In deploy mode it will deploy kafka including zookeeper.
# In clean mode it will remove kafka and zookeeper containers.
-- include: deploy.yml
+- import_tasks: deploy.yml
when: mode == "deploy"
-- include: clean.yml
+- import_tasks: clean.yml
when: mode == "clean"
\ No newline at end of file
diff --git a/ansible/roles/nginx/tasks/main.yml b/ansible/roles/nginx/tasks/main.yml
index d1f78af..81e9f4a 100644
--- a/ansible/roles/nginx/tasks/main.yml
+++ b/ansible/roles/nginx/tasks/main.yml
@@ -3,8 +3,8 @@
# In deploy mode it will deploy an nginx server.
# In clean mode it will remove the nginx server as well as nginx.confdir
-- include: deploy.yml
+- import_tasks: deploy.yml
when: mode == "deploy"
-- include: clean.yml
+- import_tasks: clean.yml
when: mode == "clean"
diff --git a/ansible/roles/prereq/tasks/main.yml b/ansible/roles/prereq/tasks/main.yml
index 3721a81..cee6ab0 100644
--- a/ansible/roles/prereq/tasks/main.yml
+++ b/ansible/roles/prereq/tasks/main.yml
@@ -3,8 +3,8 @@
# In deploy mode it will install all necessary packages and programs.
# In clean mode it will uninstall packages from deploy mode.
-- include: deploy.yml
+- import_tasks: deploy.yml
when: mode == "deploy"
-- include: clean.yml
+- import_tasks: clean.yml
when: mode == "clean"
diff --git a/ansible/roles/redis/tasks/main.yml b/ansible/roles/redis/tasks/main.yml
index 226e89c..b0bef65 100644
--- a/ansible/roles/redis/tasks/main.yml
+++ b/ansible/roles/redis/tasks/main.yml
@@ -3,9 +3,9 @@
# In deploy mode it will deploy redis.
# In clean mode it will remove the redis containers.
-- include: deploy.yml
+- import_tasks: deploy.yml
when: mode == "deploy"
-- include: clean.yml
+- import_tasks: clean.yml
when: mode == "clean"
diff --git a/ansible/roles/registry/tasks/main.yml b/ansible/roles/registry/tasks/main.yml
index e4de59c..b6bacd1 100644
--- a/ansible/roles/registry/tasks/main.yml
+++ b/ansible/roles/registry/tasks/main.yml
@@ -4,8 +4,8 @@
# Recycling means retaining the last few images of all repos and importing them into the new instance.
# In clean mode it will remove the registry, deleting all images.
-- include: deploy.yml
+- import_tasks: deploy.yml
when: mode == "deploy"
-- include: clean.yml
+- import_tasks: clean.yml
when: mode == "clean"
\ No newline at end of file
diff --git a/ansible/roles/routemgmt/tasks/main.yml b/ansible/roles/routemgmt/tasks/main.yml
index 3f5bece..42edb08 100644
--- a/ansible/roles/routemgmt/tasks/main.yml
+++ b/ansible/roles/routemgmt/tasks/main.yml
@@ -3,8 +3,8 @@
# In deploy mode it will deploy the API Gateway route management actions.
# In clean mode it will remove the API Gateway route management actions.
-- include: deploy.yml
+- import_tasks: deploy.yml
when: mode == "deploy"
-- include: clean.yml
+- import_tasks: clean.yml
when: mode == "clean"
diff --git a/ansible/roles/whiskhost/tasks/deploy.yml b/ansible/roles/whiskhost/tasks/deploy.yml
index 624ab33..9989628 100644
--- a/ansible/roles/whiskhost/tasks/deploy.yml
+++ b/ansible/roles/whiskhost/tasks/deploy.yml
@@ -1,7 +1,7 @@
---
# Add user and patch kernel.
-- include: addUser.yml
+- import_tasks: addUser.yml
when: docker.user is defined
-- include: patchKernel.yml
+- import_tasks: patchKernel.yml
diff --git a/ansible/roles/whiskhost/tasks/main.yml b/ansible/roles/whiskhost/tasks/main.yml
index b0d2f94..457cb8b 100644
--- a/ansible/roles/whiskhost/tasks/main.yml
+++ b/ansible/roles/whiskhost/tasks/main.yml
@@ -3,8 +3,8 @@
# In deploy mode it will patch the system with the right kernel.
# In clean mode it will do nothing atm.
-- include: deploy.yml
+- import_tasks: deploy.yml
when: mode == "deploy"
-- include: clean.yml
+- import_tasks: clean.yml
when: mode == "clean"
diff --git a/ansible/roles/zookeeper/tasks/main.yml b/ansible/roles/zookeeper/tasks/main.yml
index 0140e39..5b3f119 100644
--- a/ansible/roles/zookeeper/tasks/main.yml
+++ b/ansible/roles/zookeeper/tasks/main.yml
@@ -3,8 +3,8 @@
# In deploy mode it will deploy kafka including zookeeper.
# In clean mode it will remove kafka and zookeeper containers.
-- include: deploy.yml
+- import_tasks: deploy.yml
when: mode == "deploy"
-- include: clean.yml
+- import_tasks: clean.yml
when: mode == "clean"
\ No newline at end of file
diff --git a/ansible/routemgmt.yml b/ansible/routemgmt.yml
index 1807328..db72a81 100644
--- a/ansible/routemgmt.yml
+++ b/ansible/routemgmt.yml
@@ -1,7 +1,7 @@
---
# This playbook deploys the Openwhisk API Gateway route management actions.
-- include: properties.yml
+- import_playbook: properties.yml
- hosts: ansible
roles:
diff --git a/ansible/tasks/initdb.yml b/ansible/tasks/initdb.yml
index 5a8665a..93ee6cf 100644
--- a/ansible/tasks/initdb.yml
+++ b/ansible/tasks/initdb.yml
@@ -2,12 +2,12 @@
# This task will initialize the immortal DBs in the database account.
# This step is usually done only once per deployment.
-- include: db/recreateDb.yml
+- include_tasks: db/recreateDb.yml
vars:
dbName: "{{ db.whisk.auth }}"
forceRecreation: False
-- include: db/recreateDoc.yml
+- include_tasks: db/recreateDoc.yml
vars:
dbName: "{{ db.whisk.auth }}"
doc: "{{ lookup('file', '{{ item }}') }}"
@@ -17,7 +17,7 @@
- "{{ openwhisk_home }}/ansible/files/namespace_throttlings_design_document_for_subjects_db.json"
- name: create necessary "auth" keys
- include: db/recreateDoc.yml
+ include_tasks: db/recreateDoc.yml
vars:
key: "{{ lookup('file', 'files/auth.{{ item }}') }}"
dbName: "{{ db.whisk.auth }}"
diff --git a/ansible/tasks/recreateViews.yml b/ansible/tasks/recreateViews.yml
index d237da7..5ee657e 100644
--- a/ansible/tasks/recreateViews.yml
+++ b/ansible/tasks/recreateViews.yml
@@ -1,7 +1,7 @@
---
# Recreates all views in all databases.
-- include: db/recreateDoc.yml
+- include_tasks: db/recreateDoc.yml
vars:
dbName: "{{ db.whisk.actions }}"
doc: "{{ lookup('file', '{{ item }}') }}"
@@ -9,7 +9,7 @@
- "{{ openwhisk_home }}/ansible/files/whisks_design_document_for_entities_db_v2.1.0.json"
- "{{ openwhisk_home }}/ansible/files/filter_design_document.json"
-- include: db/recreateDoc.yml
+- include_tasks: db/recreateDoc.yml
vars:
dbName: "{{ db.whisk.activations }}"
doc: "{{ lookup('file', '{{ item }}') }}"
diff --git a/ansible/tasks/wipeDatabase.yml b/ansible/tasks/wipeDatabase.yml
index b95f7fb..dde9fa0 100644
--- a/ansible/tasks/wipeDatabase.yml
+++ b/ansible/tasks/wipeDatabase.yml
@@ -2,15 +2,15 @@
# Wipe transient databases. You should know what you are doing here.
# withViews: True or False. Says, if the views have to be recreated.
-- include: db/recreateDb.yml
+- include_tasks: db/recreateDb.yml
vars:
dbName: "{{ db.whisk.actions }}"
forceRecreation: True
-- include: db/recreateDb.yml
+- include_tasks: db/recreateDb.yml
vars:
dbName: "{{ db.whisk.activations }}"
forceRecreation: True
when: db.whisk.activations != db.whisk.actions
-- include: recreateViews.yml
+- include_tasks: recreateViews.yml
when: withViews == True
diff --git a/ansible/wipe.yml b/ansible/wipe.yml
index edda64a..c8603b7 100644
--- a/ansible/wipe.yml
+++ b/ansible/wipe.yml
@@ -3,7 +3,7 @@
- hosts: ansible
tasks:
- - include: tasks/wipeDatabase.yml
+ - import_tasks: tasks/wipeDatabase.yml
vars:
withViews: True
when: mode == "deploy"
--
To stop receiving notification emails like this one, please contact
rabbah@apache.org.