From da05908d657ebf98468fb9c768c138d286f9b424 Mon Sep 17 00:00:00 2001 From: Fabio Sinibaldi Date: Tue, 14 Jul 2026 17:30:01 +0200 Subject: [PATCH] OS_getInfo Playbook --- ansible/playbooks/OS_getInfo.yaml | 37 +++++++++++++++++++++++++++++++ ansible/requirements.yml | 3 +++ 2 files changed, 40 insertions(+) create mode 100644 ansible/playbooks/OS_getInfo.yaml diff --git a/ansible/playbooks/OS_getInfo.yaml b/ansible/playbooks/OS_getInfo.yaml new file mode 100644 index 0000000..2c8433d --- /dev/null +++ b/ansible/playbooks/OS_getInfo.yaml @@ -0,0 +1,37 @@ +--- +- 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}}" + + + + diff --git a/ansible/requirements.yml b/ansible/requirements.yml index da8e417..b06e721 100644 --- a/ansible/requirements.yml +++ b/ansible/requirements.yml @@ -32,6 +32,9 @@ collections: - name: chrissayon.wordpress_docker version: 1.0.2 + - name: openstack.cloud + version: 2.6.0 + # dockerless wordpress # - name: iamgini.wordpress # version: 1.0.0