SSE-Lab/ansible/playbooks/OS_getInfo.yaml

38 lines
790 B
YAML

---
- hosts: localhost
collections:
- openstack.cloud
vars:
cloud: openstack
tasks:
- name : Get images
resources:
service: image
type: image
register: images
- debug:
msg: "Images : {{images.resources | mapattributes(['name','status']) | to_nice_yaml}}"
- name : Get compute flavors
resources:
service: compute
type: flavor
register: flavors
- debug:
msg: "Flavors : {{flavors.resources | mapattributes(['name','ram','vcpus']) | to_nice_yaml}}"
- name : Get networks
resources:
service: network
type: network
register: networks
- debug:
msg: "Networks : {{networks.resources | mapattributes(['name','status']) | to_nice_yaml}}"