copy the gcp_user_gcsdockerregistry.yml to /tmp/<user>/ to be used by the byo-inventory
msg: "Please define {{ item }}"
when: "{{ item }} is undefined and obg_cloud_provider == 'gcp'"
with_items:
+ - obg_gcp_user_gcsdockerregistry_file
- obg_registry_storage_gcs_keyfile
- name: Set custom Web UI vars
state: directory
recurse: True
-#- set_fact:
-# dest_gcsdockerregistry_file: "{{ obg_output_path }}/{{ obg_clusterid }}-gcp_user_gcsdockerregistry.json"
-# when: obg_gcp_user_gcsdockerregistry_file is defined
-#
-#- name: copy and convert gcp_user_gcsdockerregistry
-# shell: "rm -f {{ dest_gcsdockerregistry_file }}; python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < {{ obg_gcp_user_gcsdockerregistry_file }} > {{ dest_gcsdockerregistry_file }}"
-# when: obg_gcp_user_gcsdockerregistry_file is defined
-#
-#- debug:
-# var: gcsdockerregistry_out
-# verbosity: 2
+- name: copy gcp_user_gcsdockerregistry to obg_output_path
+ copy:
+ src: "{{ obg_gcp_user_gcsdockerregistry_file }}"
+ dest: "{{ obg_output_path }}/{{ obg_clusterid }}-gcp_user_gcsdockerregistry.json"
+ when: g_inventory_cloud_provider == "gcp"
+
+- debug:
+ var: gcsdockerregistry_out
+ verbosity: 2
- name: create the byo
template:
