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 1e8f070  Remove ansible warnings and use unarchive task (#4267)
1e8f070 is described below

commit 1e8f07032cdcda6324fdddf1790bc6ada73f498d
Author: rodric rabbah <[email protected]>
AuthorDate: Wed Feb 13 08:47:11 2019 -0500

    Remove ansible warnings and use unarchive task (#4267)
---
 ansible/roles/cli/tasks/deploy.yml        | 30 +++++++++++++-----------------
 ansible/roles/controller/tasks/deploy.yml | 16 +++++++---------
 ansible/roles/invoker/tasks/deploy.yml    | 16 ++++++++--------
 3 files changed, 28 insertions(+), 34 deletions(-)

diff --git a/ansible/roles/cli/tasks/deploy.yml 
b/ansible/roles/cli/tasks/deploy.yml
index 914c5b6..d7efa0b 100644
--- a/ansible/roles/cli/tasks/deploy.yml
+++ b/ansible/roles/cli/tasks/deploy.yml
@@ -14,7 +14,7 @@
 
 - name: "Ensure temporary directory exists"
   file:
-    path: "{{ nginx.confdir }}/cli_temp/{{ openwhisk_cli.archive_name }}"
+    path: "{{ nginx.confdir }}/cli_temp"
     state: directory
 
 - name: "Download release archive to build directory ..."
@@ -30,19 +30,11 @@
     dest: "{{ nginx.confdir }}/cli_temp/{{ openwhisk_cli.archive_name }}.tgz"
   when: openwhisk_cli.installation_mode == "local"
 
-#
-#   I really wanted to use 'unarchive' here, but it was quite buggy and didn't
-#   want to cooperate, so we do a good old-fashioned tar x instead
-#
 - name: "Expand the archive into the build directory"
-  shell: >
-    tar zxf {{ nginx.confdir }}/cli_temp/{{ openwhisk_cli.archive_name }}.tgz
-    -C {{ nginx.confdir }}/cli_temp/{{ openwhisk_cli.archive_name }}/
-
-# Remote copy does not support recursive copy of directories. That's why I'm 
using the shell.
-- name: "Copy expanded archive to final configuration directory"
-  #  WARNING:  The trailing slash is significant, signalling to copy contents
-  shell: "cp -r {{ nginx.confdir }}/cli_temp/{{ openwhisk_cli.archive_name 
}}/* {{ openwhisk_cli.nginxdir.name }}"
+  unarchive:
+    src: "{{ nginx.confdir }}/cli_temp/{{ openwhisk_cli.archive_name }}.tgz"
+    dest: "{{ openwhisk_cli.nginxdir.name }}"
+    remote_src: yes
 
 - name: "Delete temp directory"
   file:
@@ -58,7 +50,10 @@
   register: individual_tarballs
 
 - name: "Unarchive the individual tarballs"
-  shell: tar zxf {{ item.path }} -C {{ item.path | dirname }}
+  unarchive:
+    src: "{{ item.path }}"
+    dest: "{{ item.path | dirname }}"
+    remote_src: yes
   with_items: "{{ individual_tarballs.files }}"
 
 - name: "Generate a list of individual zipfiles to expand"
@@ -68,8 +63,9 @@
       recurse: true
   register: individual_zipfiles
 
-# Use old good unzip instead of unarchive due to a known issue on MacOS
-# https://github.com/ansible/ansible-modules-core/issues/3952
 - name: "Unarchive the individual zipfiles into binaries"
-  shell: unzip -o {{ item.path }} -d {{ item.path | dirname }}
+  unarchive:
+    src: "{{ item.path }}"
+    dest: "{{ item.path | dirname }}"
+    remote_src: yes
   with_items: "{{ individual_zipfiles.files }}"
diff --git a/ansible/roles/controller/tasks/deploy.yml 
b/ansible/roles/controller/tasks/deploy.yml
index 7594e28..a03fd9f 100644
--- a/ansible/roles/controller/tasks/deploy.yml
+++ b/ansible/roles/controller/tasks/deploy.yml
@@ -132,7 +132,7 @@
       "CONTROLLER_INSTANCES": "{{ controller.instances }}"
       "JMX_REMOTE": "{{ jmx.enabled }}"
 
-      "PORT": 8080
+      "PORT": "8080"
       "TZ": "{{ docker.timezone }}"
 
       "CONFIG_whisk_info_date": "{{ whisk.version.date }}"
@@ -183,7 +183,7 @@
       "CONFIG_whisk_db_actionsDdoc": "{{ db_whisk_actions_ddoc | default() }}"
       "CONFIG_whisk_db_activationsDdoc": "{{ db_whisk_activations_ddoc | 
default() }}"
       "CONFIG_whisk_db_activationsFilterDdoc": "{{ 
db_whisk_activations_filter_ddoc | default() }}"
-      "CONFIG_whisk_userEvents_enabled": "{{ user_events }}"
+      "CONFIG_whisk_userEvents_enabled": "{{ user_events | default(false) | 
string }}"
 
       "LIMITS_ACTIONS_INVOKES_PERMINUTE": "{{ limits.invocationsPerMinute }}"
       "LIMITS_ACTIONS_INVOKES_CONCURRENT": "{{ limits.concurrentInvocations }}"
@@ -211,13 +211,13 @@
       "CONFIG_whisk_runtimes_defaultImageTag":
         "{{ runtimes_default_image_tag | default() }}"
       "CONFIG_whisk_runtimes_bypassPullForLocalImages":
-        "{{ runtimes_bypass_pull_for_local_images | default() }}"
+        "{{ runtimes_bypass_pull_for_local_images | default() | string }}"
       "CONFIG_whisk_runtimes_localImagePrefix":
         "{{ runtimes_local_image_prefix | default() }}"
 
-      "METRICS_KAMON": "{{ metrics.kamon.enabled }}"
-      "METRICS_KAMON_TAGS": "{{ metrics.kamon.tags }}"
-      "METRICS_LOG": "{{ metrics.log.enabled }}"
+      "METRICS_KAMON": "{{ metrics.kamon.enabled | default(false) | string }}"
+      "METRICS_KAMON_TAGS": "{{ metrics.kamon.tags | default() | string }}"
+      "METRICS_LOG": "{{ metrics.log.enabled | default(false) | string }}"
       "CONFIG_whisk_controller_protocol": "{{ controller.protocol }}"
       "CONFIG_whisk_controller_https_keystorePath":
         "/conf/{{ controller.ssl.keystore.name }}"
@@ -247,7 +247,7 @@
 
       "CONFIG_whisk_transactions_header": "{{ transactions.header }}"
 
-      "CONFIG_whisk_controller_activation_pollingFromDb": "{{ 
controller_activation_pollingFromDb | default(true) }}"
+      "CONFIG_whisk_controller_activation_pollingFromDb": "{{ 
controller_activation_pollingFromDb | default(true) | string }}"
 
 - name: merge extra env variables
   set_fact:
@@ -323,5 +323,3 @@
   until: result.status == 200
   retries: 12
   delay: 5
-
-# VIM: let b:syntastic_yaml_yamllint_args="-c 
'".expand('%:p:h')."../../../yamllint.yml'"
diff --git a/ansible/roles/invoker/tasks/deploy.yml 
b/ansible/roles/invoker/tasks/deploy.yml
index 2339110..91c0144 100644
--- a/ansible/roles/invoker/tasks/deploy.yml
+++ b/ansible/roles/invoker/tasks/deploy.yml
@@ -189,7 +189,7 @@
       "JAVA_OPTS": "-Xmx{{ invoker.heap }} -XX:+CrashOnOutOfMemoryError 
-XX:+UseGCOverheadLimit -XX:ErrorFile=/logs/java_error.log"
       "INVOKER_OPTS": "{{ invoker_args | default(invoker.arguments) }}"
       "JMX_REMOTE": "{{ jmx.enabled }}"
-      "PORT": 8080
+      "PORT": "8080"
       "TZ": "{{ docker.timezone }}"
       "KAFKA_HOSTS": "{{ kafka_connect_string }}"
       "CONFIG_whisk_kafka_replicationFactor": "{{ kafka.replicationFactor | 
default() }}"
@@ -201,7 +201,7 @@
       "CONFIG_whisk_kafka_common_sslTruststorePassword": "{{ 
kafka.ssl.keystore.password }}"
       "CONFIG_whisk_kafka_common_sslKeystoreLocation": "/conf/{{ 
kafka.ssl.keystore.name }}"
       "CONFIG_whisk_kafka_common_sslKeystorePassword": "{{ 
kafka.ssl.keystore.password }}"
-      "CONFIG_whisk_userEvents_enabled": "{{ user_events }}"
+      "CONFIG_whisk_userEvents_enabled": "{{ user_events | default(false) | 
string }}"
       "ZOOKEEPER_HOSTS": "{{ zookeeper_connect_string }}"
       "CONFIG_whisk_couchdb_protocol": "{{ db.protocol }}"
       "CONFIG_whisk_couchdb_host": "{{ db.host }}"
@@ -223,17 +223,17 @@
       "WHISK_API_HOST_NAME": "{{ whisk_api_host_name | default(groups['edge'] 
| first) }}"
       "RUNTIMES_REGISTRY": "{{ runtimes_registry | default('') }}"
       "RUNTIMES_MANIFEST": "{{ runtimesManifest | to_json }}"
-      "CONFIG_whisk_runtimes_bypassPullForLocalImages": "{{ 
runtimes_bypass_pull_for_local_images | default() }}"
+      "CONFIG_whisk_runtimes_bypassPullForLocalImages": "{{ 
runtimes_bypass_pull_for_local_images | default() | string }}"
       "CONFIG_whisk_runtimes_localImagePrefix": "{{ 
runtimes_local_image_prefix | default() }}"
       "CONFIG_whisk_containerFactory_containerArgs_network": "{{ 
invoker_container_network_name | default('bridge') }}"
       "INVOKER_CONTAINER_POLICY": "{{ invoker_container_policy_name | 
default()}}"
       "CONFIG_whisk_containerPool_userMemory": "{{ 
hostvars[groups['invokers'][invoker_index | int]].user_memory | 
default(invoker.userMemory) }}"
       "CONFIG_whisk_docker_client_parallelRuns": "{{ invoker_parallel_runs | 
default() }}"
-      "CONFIG_whisk_docker_containerFactory_useRunc": "{{ invoker.useRunc }}"
+      "CONFIG_whisk_docker_containerFactory_useRunc": "{{ invoker.useRunc | 
default(false) | string }}"
       "WHISK_LOGS_DIR": "{{ whisk_logs_dir }}"
-      "METRICS_KAMON": "{{ metrics.kamon.enabled }}"
-      "METRICS_KAMON_TAGS": "{{ metrics.kamon.tags }}"
-      "METRICS_LOG": "{{ metrics.log.enabled }}"
+      "METRICS_KAMON": "{{ metrics.kamon.enabled | default(false) | string }}"
+      "METRICS_KAMON_TAGS": "{{ metrics.kamon.tags | default() | string }}"
+      "METRICS_LOG": "{{ metrics.log.enabled | default(false) | string }}"
       "CONFIG_kamon_statsd_hostname": "{{ metrics.kamon.host }}"
       "CONFIG_kamon_statsd_port": "{{ metrics.kamon.port }}"
       "CONFIG_whisk_spi_LogStoreProvider": "{{ userLogs.spi }}"
@@ -249,7 +249,7 @@
       "CONFIG_whisk_concurrencyLimit_std": "{{ limit_action_concurrency_std | 
default() }}"
       "CONFIG_whisk_activation_payload_max": "{{ limit_activation_payload | 
default() }}"
       "CONFIG_whisk_transactions_header": "{{ transactions.header }}"
-      "CONFIG_whisk_containerPool_akkaClient": "{{ container_pool_akka_client 
| default('false') }}"
+      "CONFIG_whisk_containerPool_akkaClient": "{{ container_pool_akka_client 
| default('false') | string }}"
       "CONFIG_whisk_containerFactory_containerArgs_extraArgs_env_0": 
"__OW_ALLOW_CONCURRENT={{ runtimes_enable_concurrency | default('false') }}"
       "CONFIG_whisk_invoker_protocol": "{{ invoker.protocol }}"
       "CONFIG_whisk_invoker_https_keystorePath": "/conf/{{ 
invoker.ssl.keystore.name }}"

Reply via email to