More progress on GitLab installation

This commit is contained in:
Salt 2020-04-26 04:50:40 -05:00
parent 5fa716d470
commit 2247a9db5d
2 changed files with 32 additions and 10 deletions

View File

@ -85,6 +85,16 @@
force: yes force: yes
repo: "https://gitlab.com/gitlab-org/gitlab-foss.git" repo: "https://gitlab.com/gitlab-org/gitlab-foss.git"
version: 12-10-stable version: 12-10-stable
- name: Create public directory
file:
path: "/home/git/public"
mode: "0755"
state: directory
- name: Create uploads directory
file:
path: "/home/git/public/uploads"
mode: "0700"
state: directory
- name: Copy secrets - name: Copy secrets
copy: copy:
src: "/home/git/gitlab/config/secrets.yml.example" src: "/home/git/gitlab/config/secrets.yml.example"
@ -97,6 +107,8 @@
loop: loop:
- { src: "gitlab.yml", dest: "/home/git/gitlab/config/gitlab.yml" } - { src: "gitlab.yml", dest: "/home/git/gitlab/config/gitlab.yml" }
- { src: "pumba.rb", dest: "/home/git/gitlab/config/puma.rb" } - { src: "pumba.rb", dest: "/home/git/gitlab/config/puma.rb" }
- { src: "rack_attack.rb", dest: "/home/git/gitlab/config/initializers/rack_attack.rb" }
- { src: "resque.yml", dest: "/home/git/gitlab/config/resque.yml" }
- name: Change permissions - name: Change permissions
file: file:
path: "{{ item.src }}" path: "{{ item.src }}"
@ -110,16 +122,16 @@
- { src: "/home/git/gitlab/builds", mode: "u+rwX" } - { src: "/home/git/gitlab/builds", mode: "u+rwX" }
- { src: "/home/git/gitlab/shared/artifacts", mode: "u+rwX" } - { src: "/home/git/gitlab/shared/artifacts", mode: "u+rwX" }
- { src: "/home/git/gitlab/shared/pages", mode: "u+rwX" } - { src: "/home/git/gitlab/shared/pages", mode: "u+rwX" }
- name: Create public directory - name: Configure git
file: git_config:
path: "/home/git/public" name: "{{ item.name }}"
mode: "0755" value: "{{ item.value }}"
state: directory loop:
- name: Create uploads directory - { name: "core.autocrlf", value: "input" }
file: - { name: "gc.auto", value: "0" }
path: "/home/git/public/uploads" - { name: "repack.writeBitmaps", value: "true" }
mode: "0700" - { name: "receive.advertisePushOptions", value: "true" }
state: directory - { name: "core.fsyncObjectFiles", value: "true" }
become: yes become: yes
become_user: git become_user: git
- name: Set up Apache - name: Set up Apache

View File

@ -0,0 +1,10 @@
production:
adapter: mysql2
encoding: utf8
collation: utf8_general_ci
reconnect: false
database: gitlab
pool: 10
username: gitlab
password: {{ gitlab_mysql_password }}
host: localhost