This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
ansible:ansible_variables [2023/08/29 20:38] manu [Ansible inventory] |
ansible:ansible_variables [2025/05/21 16:24] (current) manu |
||
---|---|---|---|
Line 237: | Line 237: | ||
172.16.120.188: {} | 172.16.120.188: {} | ||
</cli> | </cli> | ||
+ | |||
+ | ===== Custom variable ===== | ||
+ | |||
+ | ==== Time / date ==== | ||
+ | |||
+ | <code> | ||
+ | - hosts: test | ||
+ | vars: | ||
+ | time: "{{ lookup('pipe', 'date -d \"1 day ago\" +\"%Y%m%d\"') }}" | ||
+ | </code> | ||
+ | |||
+ |