Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve local_development.yml file to allow users choose between HTTPS/GIT clone methods. #52

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions local_development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
connection: local
gather_facts: yes
tasks:
- name: Get input
ansible.builtin.pause:
prompt: "Enter clone method 'https' or 'git'"
register: clone_method
until: input.user_input | lower in ['https', 'git']
retries: 3
delay: 0

- name: Confirm prerequisite environment variables are set
ansible.builtin.assert:
that: lookup('env', item.variable) | length > 0
Expand Down Expand Up @@ -138,12 +146,13 @@
dest: "{{ lookup('env', 'ANSIBLE_COLLECTIONS_PATH') }}/ansible_collections/cloudera/{{ item.collection}}"
version: devel
loop:
- repo: [email protected]:cloudera-labs/cloudera.cloud.git
- repo: "{{ 'https://github.com/cloudera-labs/cloudera.cloud.git' if clone_method == 'HTTPS' else 'git@github.com:cloudera-labs/cloudera.cloud.git' }}"
collection: cloud
- repo: [email protected]:cloudera-labs/cloudera.cluster.git
- repo: "{{ 'https://github.com/cloudera-labs/cloudera.cluster.git' if clone_method == 'HTTPS' else 'git@github.com:cloudera-labs/cloudera.cluster.git' }}"
collection: cluster
- repo: [email protected]:cloudera-labs/cloudera.exe.git
- repo: "{{ 'https://github.com/cloudera-labs/cloudera.exe.git' if clone_method == 'HTTPS' else 'git@github.com:cloudera-labs/cloudera.exe.git' }}"
collection: exe
when: clone_method in ['HTTPS', 'GIT']
register: __cldr_collections
tags:
- collections
Expand Down
Loading