This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: date and time demo | |
hosts: localhost | |
connection: local | |
gather_facts: true | |
tasks: | |
- name: time of day | |
vars: | |
afternoon: 'afternoon' | |
morning: "{{ 'morning' if ansible_date_time.hour < '12' else afternoon }}" |
OlderNewer