Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to reset --hard with ansibles git module?

Tags:

ansible

Is it possible to do a reset --hard with ansible? Without using command: if possible.

like image 985
Atlantic0 Avatar asked Mar 10 '23 15:03

Atlantic0


1 Answers

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
like image 148
Xiong Chiamiov Avatar answered May 18 '23 19:05

Xiong Chiamiov