DEV Community

Query Filter
Query Filter

Posted on

docker32

- name: "AUDIT: Force Dump of ALL Environment Keys"
  ansible.builtin.debug:
    msg: "{{ query('varnames', '.+') | select('match', '^ansible_env$|^environment$') | list }}"
  # If the above is too complex, try the most direct Python-style dump:

- name: "AUDIT: The 'Brute Force' Python Env Dump"
  ansible.builtin.debug:
    msg: "{{ lookup('vars', 'ansible_env') }}"
  ignore_errors: yes

- name: "AUDIT: The 'Direct Plugin' Dump"
  ansible.builtin.debug:
    msg: "{{ lookup('env', 'PATH') }} is visible, but can I see everything? {{ lookup('dict', ansible_env) }}"
  ignore_errors: yes
Enter fullscreen mode Exit fullscreen mode

Top comments (0)