Skip to content

Instantly share code, notes, and snippets.

@resmo
Last active October 4, 2016 20:45
Show Gist options
  • Select an option

  • Save resmo/74612d4fff6faccea5197f41753b7dd0 to your computer and use it in GitHub Desktop.

Select an option

Save resmo/74612d4fff6faccea5197f41753b7dd0 to your computer and use it in GitHub Desktop.
---
- hosts: localhost
gather_facts: yes
tasks:
- name: extract new templates
local_action:
module: cs_template
name: my template
state: extracted
api_region: first region
register: tpl
- name: remove old templates in prod cloud cross zones
local_action:
module: cs_template
name: my template
cross_zones: yes
state: absent
api_region: second region
- name: register template in prod cloud
local_action:
module: cs_template
name: "my template"
display_text: "my template ({{ ansible_date_time.date }})"
os_type: "Debian 8"
cross_zones: yes
password_enabled: yes
sshkey_enabled: yes
is_extractable: yes
is_public: no
is_featured: yes
requires_hvm: yes
hypervisor: VMware
format: OVA
url: "{{ tpl.url | default('') }}"
api_region: "second region"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment