gitolite.yml 694 B

12345678910111213141516171819202122232425
  1. ---
  2. - name: Install gitolite3
  3. dnf: name={{ item }} state=present
  4. with_items:
  5. - gitolite3
  6. - name: Install gitolite.rc to ~/.gitolite.rc
  7. become_user: "{{ ansible_env.SUDO_USER }}"
  8. copy:
  9. src: gitolite3.rc
  10. dest: /home/{{ ansible_env.SUDO_USER }}/.gitolite.rc
  11. - name: Create a key for gitolite
  12. become_user: "{{ ansible_env.SUDO_USER }}"
  13. command: ssh-keygen -f gitolite_rsa -t rsa -N ''
  14. args:
  15. chdir: /home/{{ ansible_env.SUDO_USER }}
  16. creates: /home/{{ ansible_env.SUDO_USER }}/gitolite_rsa.pub
  17. - name: Setup gitolite
  18. become_user: "{{ ansible_env.SUDO_USER }}"
  19. command: gitolite setup -pk gitolite_rsa.pub
  20. args:
  21. chdir: /home/{{ ansible_env.SUDO_USER }}