Created
November 1, 2019 04:41
-
-
Save icarrr/5ce33237902fd1461ee23b145586e310 to your computer and use it in GitHub Desktop.
Get Time by timezone and set to variable ansible
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
--- | |
- hosts: localhost | |
tasks: | |
- name: Get Time by timezone | |
shell: TZ=Asia/Jakarta date '+%Y-%m-%d %H:%M:%S' | |
register: timeByTimezone | |
- debug: | |
msg: "{{timeByTimezone}}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment