gitolite.yml 681 B

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