Skip to content

Instantly share code, notes, and snippets.

@UnderGrounder96
Created August 9, 2023 18:20
Show Gist options
  • Save UnderGrounder96/f7fe6cb82c329b100d281af29274db43 to your computer and use it in GitHub Desktop.
Save UnderGrounder96/f7fe6cb82c329b100d281af29274db43 to your computer and use it in GitHub Desktop.
Ansible predefined vars
HOSTVARS (ANSIBLE GATHERED, group_vars, host_vars) :
ansible_check_mode: false
ansible_config_file: /Users/x/.ansible.cfg
ansible_diff_mode: false
ansible_facts: {discovered_interpreter_python: /usr/bin/python3}
ansible_forks: 5
ansible_inventory_sources: [/Users/x/wksc/video_converter/ansible/inventory]
ansible_playbook_python: /opt/homebrew/Cellar/ansible/8.2.0_2/libexec/bin/python
ansible_run_tags: [all]
ansible_skip_tags: []
ansible_verbosity: 2
ansible_version: {full: 2.15.2, major: 2, minor: 15, revision: 2, string: 2.15.2}
discovered_interpreter_python: /usr/bin/python3
group_names: [deploy_order, gitlab, k8s]
groups:
all: [worker.node.local]
deploy_order: [worker.node.local]
gitlab: [worker.node.local]
k8s: [worker.node.local]
ungrouped: []
inventory_dir: /Users/x/wksc/video_converter/ansible
inventory_file: /Users/x/wksc/video_converter/ansible/inventory
inventory_hostname: worker.node.local
inventory_hostname_short: worker
omit: __omit_place_holder__f0afaf9978db1fd23275105bc36b580532370bd7
playbook_dir: /Users/x/wksc/video_converter/ansible
PLAYBOOK VARS:
ansible_check_mode: false
ansible_collection_name: null
ansible_config_file: /Users/x/.ansible.cfg
ansible_dependent_role_names: []
ansible_diff_mode: false
ansible_facts: {discovered_interpreter_python: /usr/bin/python3}
ansible_forks: 5
ansible_inventory_sources: [/Users/x/wksc/video_converter/ansible/inventory]
ansible_play_batch: &id002 [worker.node.local]
ansible_play_hosts: [worker.node.local]
ansible_play_hosts_all: [worker.node.local]
ansible_play_name: deploy_order
ansible_play_role_names: &id003 [deploy_role]
ansible_playbook_python: /opt/homebrew/Cellar/ansible/8.2.0_2/libexec/bin/python
ansible_role_name: deploy_role
ansible_role_names: [deploy_role]
ansible_run_tags: [all]
ansible_skip_tags: []
ansible_verbosity: 2
ansible_version: {full: 2.15.2, major: 2, minor: 15, revision: 2, string: 2.15.2}
discovered_interpreter_python: /usr/bin/python3
environment: []
group_names: [deploy_order, gitlab, k8s]
groups:
all: [worker.node.local]
deploy_order: [worker.node.local]
gitlab: [worker.node.local]
k8s: [worker.node.local]
ungrouped: &id001 []
hostvars:
worker.node.local:
ansible_check_mode: false
ansible_config_file: /Users/x/.ansible.cfg
ansible_diff_mode: false
ansible_facts: {discovered_interpreter_python: /usr/bin/python3}
ansible_forks: 5
ansible_inventory_sources: [/Users/x/wksc/video_converter/ansible/inventory]
ansible_playbook_python: /opt/homebrew/Cellar/ansible/8.2.0_2/libexec/bin/python
ansible_run_tags: [all]
ansible_skip_tags: []
ansible_verbosity: 2
ansible_version: {full: 2.15.2, major: 2, minor: 15, revision: 2, string: 2.15.2}
discovered_interpreter_python: /usr/bin/python3
group_names: [deploy_order, gitlab, k8s]
groups:
all: [worker.node.local]
deploy_order: [worker.node.local]
gitlab: [worker.node.local]
k8s: [worker.node.local]
ungrouped: *id001
inventory_dir: /Users/x/wksc/video_converter/ansible
inventory_file: /Users/x/wksc/video_converter/ansible/inventory
inventory_hostname: worker.node.local
inventory_hostname_short: worker
omit: __omit_place_holder__f0afaf9978db1fd23275105bc36b580532370bd7
playbook_dir: /Users/x/wksc/video_converter/ansible
inventory_dir: /Users/x/wksc/video_converter/ansible
inventory_file: /Users/x/wksc/video_converter/ansible/inventory
inventory_hostname: worker.node.local
inventory_hostname_short: worker
omit: __omit_place_holder__f0afaf9978db1fd23275105bc36b580532370bd7
play_hosts: *id002
playbook_dir: /Users/x/wksc/video_converter/ansible
role_name: deploy_role
role_names: *id003
role_path: /Users/x/wksc/video_converter/ansible/deploy_role
role_uuid: def300a3-d418-0b94-ac48-000000000005
- name: print host vars
template:
src: tmp.j2
dest: /tmp/ansible_vars
HOSTVARS (ANSIBLE GATHERED, group_vars, host_vars) :
{{ hostvars[inventory_hostname] | to_yaml }}
PLAYBOOK VARS:
{{ vars | to_yaml }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment