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
Which Heat output function would you use to expose a stack's server IP address for use by a calling script?
Answer: outputs section with get_attr
The 'outputs' section uses 'get_attr' to expose resource attributes (like IP addresses) so callers can retrieve them after stack creation.
When using openstacksdk, which method deletes a server by its UUID?
Answer: conn.compute.delete_server(server_id)
conn.compute.delete_server() is the openstacksdk method that sends a DELETE request to Nova for the specified server UUID.
Which HOT condition function returns true only when a parameter equals a specific value?
Answer: equals
The 'equals' condition function compares two values and returns true if they match, enabling conditional resource creation in HOT templates.
In a Bash script automating OpenStack operations, which approach best avoids storing plaintext passwords in the script?
Answer: Source an openrc file or reference clouds.yaml with OS_ env vars
Sourcing an openrc file or using clouds.yaml keeps credentials out of the script itself and leverages environment variable scoping.
Which openstack.cloud Ansible module creates a Neutron security group?
Answer: os_security_group
The 'os_security_group' module in the openstack.cloud collection creates and manages Neutron security groups.
Which Heat stack action re-runs failed resource operations without changing the template?
Answer: openstack stack check
'openstack stack check' re-checks the actual state of all stack resources and marks them accordingly, helping to recover from transient failures.
In Terraform, which command applies changes to OpenStack infrastructure after reviewing the plan?
Answer: terraform apply
'terraform apply' executes the planned infrastructure changes against the OpenStack provider after the user confirms.