Skip to content

Instantly share code, notes, and snippets.

@dariko
Created March 23, 2019 12:39
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 dariko/0e2327de608c1a9d625daa4cb275a05f to your computer and use it in GitHub Desktop.
Save dariko/0e2327de608c1a9d625daa4cb275a05f to your computer and use it in GitHub Desktop.
os_address_scope tests
- hosts: localhost
tasks:
- name: cleanup
os_address_scope:
state: absent
name: scope1
shared: false
register: out
- name: create address scope
os_address_scope:
state: present
name: scope1
shared: false
ip_version: 4
project_id: 085ca762378442899f65110062eaf85e
register: out
- fail:
when:
- not out.changed
- name: should fail updating project id
os_address_scope:
state: present
name: scope1
shared: false
project_id: e15bfbebd3ed40abaa1aa772a3ba0a35
register: out
ignore_errors: true
- fail:
when:
- not out.failed
- name: share address scope
os_address_scope:
state: present
name: scope1
shared: true
project_id: 085ca762378442899f65110062eaf85e
register: out
- fail:
when:
- not out.changed
- name: should fail unsharing address scope
os_address_scope:
state: present
name: scope1
shared: false
project_id: 085ca762378442899f65110062eaf85e
register: out
ignore_errors: true
- fail:
when:
- not out.failed
- name: should fail updating ip_version
os_address_scope:
state: present
name: scope1
shared: true
ip_version: 6
project_id: 085ca762378442899f65110062eaf85e
register: out
ignore_errors: true
- fail:
when:
- not out.failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment