Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
If that you must go a variable to Ansible playbook, utilizing the command line, then you are able to do the next:
ansible-playbook launch.yml --extra-vars "model=1.23.45 other_variable=foo"
N.B. --extra-vars
specified variables will override any variables with the identical identify outlined contained in the playbook.
It’s also possible to learn up on Passing Variables On The Command Line (Wayback Machine hyperlink to take care of versioning)
It’s also possible to specify a .yml
file with the variables:
vars:
my_version: "{{ model }}"
my_other_variable: {{ other_variable }}
This will also be enhanced with atmosphere variables:
vars:
my_version: "{{ lookup('env', 'model') }}"
my_other_variable: {{ lookup('env', 'other_variable') }}