I\'m trying to learn how to use Ansible facts as variables, and I don\'t get it. When I run...
$ ansible localhost -m setup
...it lists all
The lookup module of ansible works fine for me. The yml is:
- hosts: test vars: time: "{{ lookup('pipe', 'date -d \"1 day ago\" +\"%Y%m%d\"') }}"
You can replace any command with date to get result of the command.