How create new Git repository from Ansible directly?

Hello All ,

I am only able to clone the repository from Git with the help of Git module of Ansible. I am able to create new repository from shell and attach that shell script to Ansible.
But I want to know can I create new repository in Git from ansible directly with the help of Git module of Ansible ?

Your help is much appreciated.

Thanks,
Swapnil Patil.

Hi,

You simply can't. Git module is supposed to be used to manage git
**checkouts** of repositories.
However command module can be useful for you

- command: git init {{ repository }}

Hello All ,

I am only able to clone the repository from Git with the help of Git module
of Ansible. I am able to create new repository from shell and attach that
shell script to Ansible.
*But I want to know can I create new repository in Git from ansible
directly with the help of Git module of Ansible ?*

Probably not as the documentation says
"Manage `git' checkouts of repositories to deploy files or software."

Your help is much appreciated.

But you could use the command module to achieve this.