Skip to content

Instantly share code, notes, and snippets.

@chbrown13
Created July 27, 2017 20:25
Show Gist options
  • Save chbrown13/84c32a30c2b725408296ed6c0e98c9f3 to your computer and use it in GitHub Desktop.
Save chbrown13/84c32a30c2b725408296ed6c0e98c9f3 to your computer and use it in GitHub Desktop.
# Testing satellite-populate actions on ProvisioningTemplate entity
vars:
name: provision
new_name: provision2
actions:
# Create
- model: ProvisioningTemplate
register: test_prov_tmp
data:
name: "{{ name }}"
locked: True
audit_comment: comment
snippet: True
template: temp
template_combinations:
- a
- b
- c
# Update
- action: update
register: test_prov_tmp
model: ProvisioningTemplate
data:
name: "{{ new_name }}"
search_query:
name: "{{ name }}"
# Assert
- action: assertion
log: Checking that ProvisioningTemplate name was updated
operation: eq
data:
- from_registry: test_prov_tmp.name
- "{{ new_name }}"
# Delete
- action: delete
model: ProvisioningTemplate
search_query:
name: "{{ new_name }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment