Skip to content

Commit

Permalink
Get timestamp even in check mode
Browse files Browse the repository at this point in the history
We want to set the _timestamp fact, even when we're running
"ansible-playbook --check". Ansible skips any tasks using the shell
and command modules in check mode by default, so we have to force
running the "date" command by setting the (confusingly named)
"check_mode: no" option on that task.
  • Loading branch information
fghaas committed Jan 3, 2021
1 parent 17a61b4 commit 8dac211
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions roles/taiga/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
register: date
when: _timestamp is not defined
changed_when: false
check_mode: no
tags:
- always

Expand Down

0 comments on commit 8dac211

Please sign in to comment.