--- - name: "Load OS specific variables" include_vars: "{{ item }}" with_first_found: - files: - "{{ ansible_distribution|lower }}.yml" - "{{ ansible_os_family|lower }}.yml" - "{{ ansible_system|lower }}.yml" skip: true paths: - ../vars - name: Add git user user: name: "{{ git_user }}" home: "{{ git_dir }}" system: yes shell: "/bin/bash" generate_ssh_key: yes state: present - name: Install gitolite package: name: "{{ gitolite_pkg }}" state: present - name: Check if this is a new installation stat: path: "{{ git_dir }}/.gitolite" register: gitolite_dir - include: "init.yml" when: not gitolite_dir.stat.exists - name: Copy configuration from template template: src: gitolite.rc.j2 dest: "{{ git_dir }}/.gitolite.rc" mode: 0644 owner: "{{ git_user }}" group: "{{ git_group }}" backup: yes - name: Set permissions on {{ git_dir }}/repositories file: path: "{{ git_dir }}/repositories" recurse: yes mode: "g+rX" owner: "{{ git_user }}" group: "{{ git_group }}"