ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 491 - DOP-C01 discussion

Report
Export

Which of the following is an invalid variable name in Ansible?

A.
host1st_ref
Answers
A.
host1st_ref
B.
host-first-ref
Answers
B.
host-first-ref
C.
Host1stRef
Answers
C.
Host1stRef
D.
host_first_ref
Answers
D.
host_first_ref
Suggested answer: B

Explanation:

Variable names can contain letters, numbers and underscores and should always start with a letter. Invalid variable examples, `host first ref', `1st_host_ref''.

Reference: http://docs.ansible.com/ansible/playbooks_variables.html#what-makes-a-valid-variable-name

asked 16/09/2024
Vadym Popov
39 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first