나는 Ansible/Ansible Tower를 사용하고 있으며 내 Windows 호스트에서 사용할 수있는 사실을 확인하고 싶습니다. 내가 호스트의 정보를 수집 할 수 있도록가능 - 원격 Windows 호스트에서 사실 확인
ansible hostname -m setup
어떻게 내가 타워에서 운영하는 각본에이 통합 것입니다 : 나는 다음 실행할 수 documentation 상태?
이# This play outputs the facts of the Windows targets in scope
- name: Gather Windows Facts
hosts: "{{ target }}"
gather_facts: yes
tasks:
- setup:
register: ansible_facts
- debug: item
with_dict: ansible_facts
그러나,이를 실행하면 다음과 같은 오류가 발생합니다 :
ERROR! this task 'debug' has extra params, which is only allowed in the following modules: command, shell, script, include, include_vars, add_host, group_by, set_fact, raw, meta
/어떻게 출력이받을 수 있나요 ? – Kode
@Kode 내 업데이트를 참조하십시오. – helloV
변수가 무엇인지 알 수 있도록 큰 목록을 출력하는 방법이 있습니까? 그들의 예에서는 큰 우분투 출력을 제공합니다. 위에 열거 한 내용을 통해 이제 변수로 사용할 수있는 것을 알 수 있습니다. fact_path를 나열하지만이 기능이 회보에서 어떻게 작동하는지 잘 모르겠다. http://docs.ansible.com/ansible/setup_module.html – Kode