Skip to content

Instantly share code, notes, and snippets.

@DazWorrall
Created August 10, 2015 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DazWorrall/0d203266989418abfa1a to your computer and use it in GitHub Desktop.
Save DazWorrall/0d203266989418abfa1a to your computer and use it in GitHub Desktop.
cs_ip_address tests
---
- hosts: localhost
gather_facts: false
connection: local
tasks:
- name: Setup account
local_action:
module: cs_account
name: Jane Bloggs
username: jbloggs
password: badbadbad
domain: CUSTOMERS
first_name: Jane
last_name: Bloggs
email: jbloggs@customer.com
register: customer
- local_action:
module: cs_network
name: JB Network
network_offering: IsolatedNetworksWithRedundantSNAT
account: "{{ customer.name }}"
domain: CUSTOMERS
register: network
- local_action:
module: cs_ip_address
network: "{{ network.name }}"
register: ip_address
name: Allocate (should be changed)
- local_action:
module: cs_ip_address
ip_address: "{{ ip_address.ip_address }}"
state: absent
register: ip_address
name: Remove (should be changed)
- local_action:
module: cs_ip_address
ip_address: 1.2.3.4
state: absent
register: ip_address
name: Remove dummy (should be ok)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment