forked from openstack/ansible-collections-openstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run functional devstack job on ansible collection
Porting of job that was running on patches in Ansible. Change-Id: Ifa5a6b40d6a0f1de9f2cbc917a55c2d0e8ac421d
- Loading branch information
Showing
36 changed files
with
1,050 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- hosts: all | ||
roles: | ||
- fetch-tox-output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
- name: Authenticate to the cloud | ||
openstack.cloud.os_auth: | ||
cloud={{ cloud }} | ||
|
||
- debug: var=service_catalog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
- name: List all profiles | ||
openstack.cloud.os_client_config: | ||
register: list | ||
|
||
# WARNING: This will output sensitive authentication information!!!! | ||
- debug: var=list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
group_name: ansible_group |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
- name: Create group | ||
openstack.cloud.os_group: | ||
cloud: "{{ cloud }}" | ||
state: present | ||
name: "{{ group_name }}" | ||
|
||
- name: Update group | ||
openstack.cloud.os_group: | ||
cloud: "{{ cloud }}" | ||
state: present | ||
name: "{{ group_name }}" | ||
description: "updated description" | ||
|
||
- name: Delete group | ||
openstack.cloud.os_group: | ||
cloud: "{{ cloud }}" | ||
state: absent | ||
name: "{{ group_name }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
image_name: ansible_image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
- name: Create a test image file | ||
shell: mktemp | ||
register: tmp_file | ||
|
||
- name: Fill test image file to 1MB | ||
shell: truncate -s 1048576 {{ tmp_file.stdout }} | ||
|
||
- name: Create raw image (defaults) | ||
openstack.cloud.os_image: | ||
cloud: "{{ cloud }}" | ||
state: present | ||
name: "{{ image_name }}" | ||
filename: "{{ tmp_file.stdout }}" | ||
disk_format: raw | ||
register: image | ||
|
||
- debug: var=image | ||
|
||
- name: Delete raw image (defaults) | ||
openstack.cloud.os_image: | ||
cloud: "{{ cloud }}" | ||
state: absent | ||
name: "{{ image_name }}" | ||
|
||
- name: Create raw image (complex) | ||
openstack.cloud.os_image: | ||
cloud: "{{ cloud }}" | ||
state: present | ||
name: "{{ image_name }}" | ||
filename: "{{ tmp_file.stdout }}" | ||
disk_format: raw | ||
is_public: True | ||
min_disk: 10 | ||
min_ram: 1024 | ||
kernel: cirros-vmlinuz | ||
ramdisk: cirros-initrd | ||
properties: | ||
cpu_arch: x86_64 | ||
distro: ubuntu | ||
register: image | ||
|
||
- debug: var=image | ||
|
||
- name: Delete raw image (complex) | ||
openstack.cloud.os_image: | ||
cloud: "{{ cloud }}" | ||
state: absent | ||
name: "{{ image_name }}" | ||
|
||
- name: Delete test image file | ||
file: | ||
name: "{{ tmp_file.stdout }}" | ||
state: absent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
keypair_name: shade_keypair |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
- name: Create keypair (non-existing) | ||
openstack.cloud.os_keypair: | ||
cloud: "{{ cloud }}" | ||
name: "{{ keypair_name }}" | ||
state: present | ||
register: | ||
keypair | ||
|
||
# This assert verifies that Ansible is capable serializing data returned by SDK | ||
- name: Ensure private key is returned | ||
assert: | ||
that: | ||
- keypair.key.public_key is defined and keypair.key.public_key | ||
|
||
- name: Delete keypair (non-existing) | ||
openstack.cloud.os_keypair: | ||
cloud: "{{ cloud }}" | ||
name: "{{ keypair_name }}" | ||
state: absent | ||
|
||
- name: Generate test key file | ||
user: | ||
name: "{{ ansible_env.USER }}" | ||
generate_ssh_key: yes | ||
ssh_key_file: .ssh/shade_id_rsa | ||
|
||
- name: Create keypair (file) | ||
openstack.cloud.os_keypair: | ||
cloud: "{{ cloud }}" | ||
name: "{{ keypair_name }}" | ||
state: present | ||
public_key_file: "{{ ansible_env.HOME }}/.ssh/shade_id_rsa.pub" | ||
|
||
- name: Delete keypair (file) | ||
openstack.cloud.os_keypair: | ||
cloud: "{{ cloud }}" | ||
name: "{{ keypair_name }}" | ||
state: absent | ||
|
||
- name: Create keypair (key) | ||
openstack.cloud.os_keypair: | ||
cloud: "{{ cloud }}" | ||
name: "{{ keypair_name }}" | ||
state: present | ||
public_key: "{{ lookup('file', '~/.ssh/shade_id_rsa.pub') }}" | ||
|
||
- name: Delete keypair (key) | ||
openstack.cloud.os_keypair: | ||
cloud: "{{ cloud }}" | ||
name: "{{ keypair_name }}" | ||
state: absent | ||
|
||
- name: Delete test key pub file | ||
file: | ||
name: "{{ ansible_env.HOME }}/.ssh/shade_id_rsa.pub" | ||
state: absent | ||
|
||
- name: Delete test key pvt file | ||
file: | ||
name: "{{ ansible_env.HOME }}/.ssh/shade_id_rsa" | ||
state: absent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
domain_name: ansible_domain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
- name: Create keystone domain | ||
openstack.cloud.os_keystone_domain: | ||
cloud: "{{ cloud }}" | ||
state: present | ||
name: "{{ domain_name }}" | ||
description: "test description" | ||
|
||
- name: Update keystone domain | ||
openstack.cloud.os_keystone_domain: | ||
cloud: "{{ cloud }}" | ||
name: "{{ domain_name }}" | ||
description: "updated description" | ||
|
||
- name: Delete keystone domain | ||
openstack.cloud.os_keystone_domain: | ||
cloud: "{{ cloud }}" | ||
state: absent | ||
name: "{{ domain_name }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
role_name: ansible_keystone_role |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
- name: Create keystone role | ||
openstack.cloud.os_keystone_role: | ||
cloud: "{{ cloud }}" | ||
state: present | ||
name: "{{ role_name }}" | ||
|
||
- name: Delete keystone role | ||
openstack.cloud.os_keystone_role: | ||
cloud: "{{ cloud }}" | ||
state: absent | ||
name: "{{ role_name }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
network_name: shade_network | ||
network_shared: false | ||
network_external: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
- name: Create network | ||
openstack.cloud.os_network: | ||
cloud: "{{ cloud }}" | ||
name: "{{ network_name }}" | ||
state: present | ||
shared: "{{ network_shared }}" | ||
external: "{{ network_external }}" | ||
|
||
- name: Delete network | ||
openstack.cloud.os_network: | ||
cloud: "{{ cloud }}" | ||
name: "{{ network_name }}" | ||
state: absent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
- name: Create public flavor | ||
openstack.cloud.os_nova_flavor: | ||
cloud: "{{ cloud }}" | ||
state: present | ||
name: ansible_public_flavor | ||
is_public: True | ||
ram: 1024 | ||
vcpus: 1 | ||
disk: 10 | ||
ephemeral: 10 | ||
swap: 1 | ||
flavorid: 12345 | ||
|
||
- name: Delete public flavor | ||
openstack.cloud.os_nova_flavor: | ||
cloud: "{{ cloud }}" | ||
state: absent | ||
name: ansible_public_flavor | ||
|
||
- name: Create private flavor | ||
openstack.cloud.os_nova_flavor: | ||
cloud: "{{ cloud }}" | ||
state: present | ||
name: ansible_private_flavor | ||
is_public: False | ||
ram: 1024 | ||
vcpus: 1 | ||
disk: 10 | ||
ephemeral: 10 | ||
swap: 1 | ||
flavorid: 12345 | ||
|
||
- name: Delete private flavor | ||
openstack.cloud.os_nova_flavor: | ||
cloud: "{{ cloud }}" | ||
state: absent | ||
name: ansible_private_flavor | ||
|
||
- name: Create flavor (defaults) | ||
openstack.cloud.os_nova_flavor: | ||
cloud: "{{ cloud }}" | ||
state: present | ||
name: ansible_defaults_flavor | ||
ram: 1024 | ||
vcpus: 1 | ||
disk: 10 | ||
|
||
- name: Delete flavor (defaults) | ||
openstack.cloud.os_nova_flavor: | ||
cloud: "{{ cloud }}" | ||
state: absent | ||
name: ansible_defaults_flavor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
- name: Create a test object file | ||
shell: mktemp | ||
register: tmp_file | ||
|
||
- name: Create container | ||
openstack.cloud.os_object: | ||
cloud: "{{ cloud }}" | ||
state: present | ||
container: ansible_container | ||
container_access: private | ||
|
||
- name: Put object | ||
openstack.cloud.os_object: | ||
cloud: "{{ cloud }}" | ||
state: present | ||
name: ansible_object | ||
filename: "{{ tmp_file.stdout }}" | ||
container: ansible_container | ||
|
||
- name: Delete object | ||
openstack.cloud.os_object: | ||
cloud: "{{ cloud }}" | ||
state: absent | ||
name: ansible_object | ||
container: ansible_container | ||
|
||
- name: Delete container | ||
openstack.cloud.os_object: | ||
cloud: "{{ cloud }}" | ||
state: absent | ||
container: ansible_container | ||
|
||
- name: Delete test object file | ||
file: | ||
name: "{{ tmp_file.stdout }}" | ||
state: absent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
network_name: ansible_port_network | ||
network_external: true | ||
subnet_name: ansible_port_subnet | ||
port_name: ansible_port | ||
secgroup_name: ansible_port_secgroup | ||
no_security_groups: True |
Oops, something went wrong.