Saturday, June 5, 2021

use windows facts in ansible

check available facts for that host 

ansible -m setup hostname

---
- hosts: win
  tasks:
    - name: Get custom facts
      debug:
      msg: The custom fact is {{ansible_local.date_time}}

No comments: