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.

65 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:
  15. repo: 'deb https://packages.gitlab.com/gitlab/gitlab-ce/debian/ jessie main'
  16. state: present
  17. - name: install gitlab package
  18. apt:
  19. name: "{{ item }}"
  20. state: present
  21. update_cache: yes
  22. cache_valid_time: 3600
  23. with_items:
  24. - gitlab-ce
  25. - block:
  26. - name: create gitlab DB
  27. postgresql_db:
  28. name: gitlabhq_production
  29. - name: create gitlab DB user
  30. postgresql_user:
  31. name: gitlab-psql
  32. # password: "{{ password }}"
  33. db: gitlabhq_production
  34. priv: ALL
  35. role_attr_flags: SUPERUSER
  36. become: true
  37. become_method: su
  38. become_user: postgres
  39. # - name: copy lilik-150x54.png
  40. # copy:
  41. # src: lilik-150x54.png
  42. # dest: /usr/share/roundcube/skins/classic/images/
  43. - name: copy my-gitlab.rb
  44. template:
  45. src: "my-gitlab.rb.j2"
  46. dest: "/etc/gitlab/my-gitlab.rb"
  47. mode: 0600
  48. notify: restart gitlab-ce
  49. - name: include my-gitlab.rb
  50. lineinfile:
  51. dest: /etc/gitlab/gitlab.rb
  52. insertafter: EOF
  53. line: eval File.open('/etc/gitlab/my-gitlab.rb').read
  54. notify: restart gitlab-ce
  55. - name: reconfigure gitlab-ce
  56. shell: gitlab-ctl reconfigure
  57. notify: restart gitlab-ce