I have an Ansible project that involves the following task:
- name: Perform a git init in source folder
ansible.builtin.command:
cmd: git init
chdir: ~/Projects/kernel/src
creates: ~/kernel/src/.git
However ansible-lint does not like this:
WARNING Listing 1 violation(s) that are fatal
command-instead-of-module: git used in place of git module (warning)
I have tried using the ansible.builtin.git module but I can't seem to find a way to make it just do an init.
Any suggestions?
Stephen
I was trying to write an Ansible task that essentially performs a git init
in a folder without ansible-lint complaining. But I can't seen to find an ansible-lint clean way of doing this.