Automation & Scripting Flashcards
7 cards from real COA practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 Automation & Scripting flashcards as text
In openstacksdk, which method is used to establish a connection to an OpenStack cloud using clouds.yaml?
Answer: openstack.connect()
openstack.connect() reads credentials from clouds.yaml or environment variables and returns a Connection object for interacting with OpenStack services.
Which file format does the OpenStack CLI use by default to store cloud credentials for multiple environments?
Answer: clouds.yaml
clouds.yaml is the preferred multi-cloud configuration file that stores credentials and endpoints for multiple OpenStack environments.
In a HOT template, how do you reference the ID of a resource named 'my_server' within the same template?
Answer: {get_resource: my_server}
The 'get_resource' intrinsic function returns the resource ID of another resource defined in the same HOT template.
Which Ansible inventory plugin dynamically fetches OpenStack instances as inventory hosts?
Answer: openstack.cloud.inventory
The 'openstack.cloud.inventory' plugin queries Nova to build a dynamic inventory of running OpenStack instances.
When scripting with the OpenStack CLI, which flag outputs results in a machine-parseable format best suited for shell scripting?
Answer: -f value
The '-f value' format outputs plain values without headers or borders, making it easiest to parse in shell scripts with standard tools like awk or cut.
Which Heat resource type provisions a new Nova server instance in a HOT template?
Answer: OS::Nova::Server
'OS::Nova::Server' is the Heat resource type used to define and launch a Nova compute instance within a stack.
Which environment variable must be exported before running OpenStack CLI commands when using openrc authentication?
Answer: OS_AUTH_URL
OS_AUTH_URL points the CLI to the Keystone identity endpoint and is required for authentication with all OpenStack services.