Playbooks to a new Lilik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.5 KiB

  1. - name: install apt-transport-https package
  2. apt:
  3. name: "{{ item }}"
  4. state: present
  5. update_cache: yes
  6. cache_valid_time: 3600
  7. with_items:
  8. - apt-transport-https
  9. - name: add gitlab omnibus apt key
  10. apt_key:
  11. url: https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey
  12. state: present
  13. - name: add gitlab omnibus repository
  14. apt_repository: repo='deb https://packages.gitlab.com/gitlab/gitlab-ce/debian/ jessie main' state=present
  15. - name: install gitlab package
  16. apt:
  17. name: "{{ item }}"
  18. state: present
  19. update_cache: yes
  20. cache_valid_time: 3600
  21. with_items:
  22. - gitlab-ce
  23. - block:
  24. - name: create gitlab DB
  25. postgresql_db: name=gitlabhq_production
  26. - name: create gitlab DB user
  27. postgresql_user:
  28. name: gitlab-psql
  29. # password: "{{ password }}"
  30. db: gitlabhq_production
  31. priv: ALL
  32. role_attr_flags: SUPERUSER
  33. become: true
  34. become_method: su
  35. become_user: postgres
  36. # - name: copy lilik-150x54.png
  37. # copy:
  38. # src: lilik-150x54.png
  39. # dest: /usr/share/roundcube/skins/classic/images/
  40. - name: copy my-gitlab.rb
  41. template:
  42. src: "my-gitlab.rb.j2"
  43. dest: "/etc/gitlab/my-gitlab.rb"
  44. mode: 0600
  45. notify: restart gitlab-ce
  46. - name: include my-gitlab.rb
  47. lineinfile:
  48. dest: /etc/gitlab/gitlab.rb
  49. insertafter: EOF
  50. line: eval File.open('/etc/gitlab/my-gitlab.rb').read
  51. notify: restart gitlab-ce
  52. - name: reconfigure gitlab-ce
  53. shell: gitlab-ctl reconfigure
  54. notify: restart gitlab-ce