---

- name: Is /etc a git repository
  stat:
    path: /etc/.git
  register: _etc_git

- include: do_commit.yml
  vars:
    git_folder: "/etc"
  when:
    - _etc_git.stat.exists
    - _etc_git.stat.isdir

- name: Is /usr/share/scripts a git repository
  stat:
    path: /usr/share/scripts/.git
  register: _usr_share_scripts_git

- include: do_commit.yml
  vars:
    git_folder: "/usr/share/scripts"
  when:
    - _usr_share_scripts_git.stat.exists
    - _usr_share_scripts_git.stat.isdir
