blob: f56c6b2a5f99b851c51a11f65709964ce3691d42 [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements; and to You under the Apache License, Version 2.0.
---
# This task will install the standard actions and packages available in openwhisk-catalog repos.
- set_fact:
catalog_location={{ item.value.location }}
catalog_repo_url={{ item.value.url }}
api_host={{ whisk_api_host_name | default(groups['edge'] | first) }}
version="HEAD"
repo_update="yes"
- set_fact:
version={{ item.value.version }}
when: item.value.version is defined
- set_fact:
repo_update={{ item.value.repo_update }}
when: item.value.repo_update is defined
- set_fact:
skip_catalog_install="{{ item.value.skip | default(false) }}"
- set_fact:
environment_catalog:
OPENWHISK_HOME: "{{ openwhisk_home }}"
- set_fact:
environment_catalog: "{{ environment_catalog | combine( { the_item.key: the_item.value } ) }}"
when: item.value.environment is defined
with_dict: "{{ item.value.environment }}"
loop_control:
loop_var: the_item
- name: "ensure catalog_location directory exists"
file:
path: "{{ catalog_location }}"
state: directory
- name: download the catalog repository to the catalog location if necessary
git:
repo: "{{ catalog_repo_url }}"
dest: "{{ catalog_location }}"
update: "{{ repo_update }}"
version: "{{ version }}"
- name: install the catalog from the catalog location
shell: ./installCatalog.sh {{ catalog_auth_key }} {{ api_host }} {{ cli.path }} chdir="{{ catalog_location }}/packages"
environment: "{{ environment_catalog }}"
when: skip_catalog_install == false