From ea3785bb1e13d9c481f06dd2839cdd02fbf634bb Mon Sep 17 00:00:00 2001 From: Pedro Garcia Rodriguez Date: Fri, 22 Sep 2023 08:32:31 +0200 Subject: [PATCH] Improve local_development.yml file to allow users choose between HTTPS/GIT clone methods --- local_development.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/local_development.yml b/local_development.yml index 3ec5248..2e0d9ea 100644 --- a/local_development.yml +++ b/local_development.yml @@ -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 @@ -138,12 +146,13 @@ dest: "{{ lookup('env', 'ANSIBLE_COLLECTIONS_PATH') }}/ansible_collections/cloudera/{{ item.collection}}" version: devel loop: - - repo: git@github.com: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: git@github.com: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: git@github.com: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