<commit_before>---
- name: Setup Accelerator Offline
  hosts: localhost
  vars:
    # Use this endpoint to clone github.com using HTTPS
    repository_secure_endpoint_https: "https://github.com/carlosfrias"
    repo_name: "apigee-opdk-playbook-setup-ansible"
    archive_folder: "{{ playbook_dir }}/apigee-opdk-accelerator"
    playbook_requirements_path:
      - "../../installations/multi-node/requirements.yml"
      - "../../installations/devportal/requirements.yml"
      - "../../installations/mirror/requirements.yml"
    folder_list_to_archive:
      - "~/.ansible"
      - "~/.apigee"
      - "~/.apigee-secure"

  tasks:
    - name: Create Archive folder
      file:
        path: "{{ archive_folder }}"
        state: directory

    - name: Download Ansible OPDK Accelerator
      git:
        repo: "{{ repository_secure_endpoint_https }}/{{ repo_name }}"
        dest: "{{ archive_folder }}/{{ repo_name }}"
        accept_hostkey: yes

    - name: Download Roles used by All Playbooks
      command: "ansible-galaxy install -r {{ item }} -f"
      with_items: "{{ playbook_requirements_path }}"

    - name: Verify that rsync is installed
      become: true
      package:
        name: "rsync"
        state: present

    - name: Synchronize Folder List to Archive
      synchronize:
        src: "{{ item }}"
        dest: "{{ archive_folder }}"
      with_items: "{{ folder_list_to_archive }}"

    - name: Create an Ansible OPDK Accelerator Archive
      archive:<commit_msg>Updated with offline-setup tasks<commit_after>---
- name: Setup Accelerator Offline
  hosts: localhost
  vars:
    # Use this endpoint to clone github.com using HTTPS
    repository_secure_endpoint_https: "https://github.com/carlosfrias"
    repo_name: "apigee-opdk-playbook-setup-ansible"
    archive_folder: "{{ playbook_dir }}/apigee-opdk-accelerator"
    playbook_requirements_path:
      - "../../installations/multi-node/requirements.yml"
      - "../../installations/devportal/requirements.yml"
      - "../../installations/mirror/requirements.yml"
    folder_list_to_archive:
      - "~/.ansible"
      - "~/.apigee"
      - "~/.apigee-secure"

  tasks:
    - name: Create Archive folder
      file:
        path: "{{ archive_folder }}"
        state: directory

    - name: Download Ansible OPDK Accelerator
      git:
        repo: "{{ repository_secure_endpoint_https }}/{{ repo_name }}"
        dest: "{{ archive_folder }}/{{ repo_name }}"
        accept_hostkey: yes

    - name: Download Roles used by All Playbooks
      command: "ansible-galaxy install -r {{ item }} -f"
      with_items: "{{ playbook_requirements_path }}"

    - name: Verify that rsync is installed
      become: true
      package:
        name: "rsync"
        state: present

    - name: Synchronize Folder List to Archive
      synchronize:
        src: "{{ item }}"
        dest: "{{ archive_folder }}"
      with_items: "{{ folder_list_to_archive }}"

    - name: Create an Ansible OPDK Accelerator Archive
      archive:
        dest: "{{ archive_folder }}.tar.gz"
{'fraction_non_alphanumeric': 0.12725483765168907, 'fraction_numerical': 0.0, 'mean_word_length': 2.5017221584385765, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5699125', 'n_tokens_mistral': 980, 'n_tokens_neox': 950, 'n_words': 213}