Is it possible to do a reset --hard with ansible? Without using command: if possible.
git reset is a command that modifies the tree, like merge, commit, rebase, and a number of others. Those aren't actions that you generally want to perform in a server configuration or application deployment process, and so aren't covered by the git module.
Why are you wanting to use reset?
If necessary, you can always fall back to using the command module:
- command: git reset --hard origin/master
args:
chdir: /my/repo/path
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With