<commit_before>---
# 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={{ 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) }}"

- 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:
    OPENWHISK_HOME: "{{ openwhisk_home }}"
  when: skip_catalog_install == false
<commit_msg>Optional package (#3128)<commit_after>---
# 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={{ 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) }}"
    optional_package_skip="{{ item.value.optional_package_skip | default(true) }}"

- 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" "{{ optional_package_skip }}"
  environment:
    OPENWHISK_HOME: "{{ openwhisk_home }}"
  when: skip_catalog_install == false

{'fraction_non_alphanumeric': 0.13753007217321572, 'fraction_numerical': 0.0016038492381716118, 'mean_word_length': 4.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2876791', 'n_tokens_mistral': 760, 'n_tokens_neox': 763, 'n_words': 194}