Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cnukaus/98fb75085e0491e55d77461617d5c5f8 to your computer and use it in GitHub Desktop.
Save cnukaus/98fb75085e0491e55d77461617d5c5f8 to your computer and use it in GitHub Desktop.
- name: create dag to cloud composer
host: all
connection: local
tasks:
- debug:
msg:
= "cloud":"{{var declared in another yaml file}}"
- name: create temp file
tempfile:
state: file
when: not ansible_check_mode
- name: copy file to temp json file
copy:
content: "{{my_list | to_json}}"
dest: "{{temp_file.path}}"
- name: deploy Dag
command : >
gcloud composer environments storage dags import \
--project={{project}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment