diff options
author | Lars Wirzenius <lwirzenius@wikimedia.org> | 2019-06-10 20:08:42 +0300 |
---|---|---|
committer | Lars Wirzenius <lwirzenius@wikimedia.org> | 2019-06-10 20:08:42 +0300 |
commit | d726218270738805273deb00c919e6e819ca9798 (patch) | |
tree | 93f36148ca56140f9a904fe306f8c59f5145ab7f /roles/gitlab/tasks/main.yml | |
download | wmf-gitlab-d726218270738805273deb00c919e6e819ca9798.tar.gz |
Initial commit
Diffstat (limited to 'roles/gitlab/tasks/main.yml')
-rw-r--r-- | roles/gitlab/tasks/main.yml | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/roles/gitlab/tasks/main.yml b/roles/gitlab/tasks/main.yml new file mode 100644 index 0000000..5605e22 --- /dev/null +++ b/roles/gitlab/tasks/main.yml @@ -0,0 +1,70 @@ +- name: install helpful stuff + apt: + name: + - locales-all + - psmisc + +- name: install gitlab dependencies + apt: + name: + - curl + - openssh-server + - ca-certificates + - postfix + - apt-transport-https + +- name: set mailname + copy: + content: | + {{ mail_hostname }} + dest: /etc/mailname + owner: root + group: root + mode: 0644 + notify: restart_postfix + +- name: configure postfix + template: + src: main.cf.j2 + dest: /etc/postfix/main.cf + notify: restart_postfix + +- name: install gitlab apt signing key + apt_key: + data: "{{ gitlab_apt_signing_key }}" + +- name: install gitlab apt sources.list + apt_repository: + update_cache: yes + codename: "{{ debian_codename }}" + repo: | + deb https://packages.gitlab.com/gitlab/gitlab-ce/debian/ {{ debian_codename }} main + +- name: install gitlab-ce + apt: + name: gitlab-ce + +- name: configure gitlab external url + lineinfile: + path: /etc/gitlab/gitlab.rb + regexp: "^external_url" + line: | + external_url '{{ external_url }}' + +- name: configure gitlab initial root password + lineinfile: + path: /etc/gitlab/gitlab.rb + regexp: "gitlab_rails.'initial_root_password'" + line: | + gitlab_rails['initial_root_password'] = "{{ root_password }}" + +- name: configure gitlab initial runner registration token + lineinfile: + path: /etc/gitlab/gitlab.rb + regexp: "gitlab_rails.'initial_shared_runners_registration_token'" + line: | + gitlab_rails['initial_shared_runners_registration_token'] = "{{runner_token }}" + +- name: start gitlab + shell: + dpkg-reconfigure gitlab-ce |