main.yml 620 Bytes
Newer Older
1 2 3 4 5
---

- name: Install Gitlab (via Docker)
  docker_container:
    name: gitlab
6
    image: "gitlab/gitlab-ce:{{ gitlab_version }}"
7 8 9 10 11 12 13 14 15 16 17
    state: started
    restart_policy: always
    hostname: "{{ hostname }}"
    ports:
      - 8000:80
    volumes:
      - /srv/gitlab/config:/etc/gitlab
      - /srv/gitlab/logs:/var/log/gitlab
      - /srv/gitlab/data:/var/opt/gitlab
    env:
      GITLAB_OMNIBUS_CONFIG: "external_url 'https://{{ hostname }}/admin/'; nginx['listen_port'] = 80; nginx['listen_https'] = false"
18 19
      GITLAB_ROOT_EMAIL: "{{ gitlab_admin_email }}"
      GITLAB_ROOT_PASSWORD: "{{ gitlab_admin_password }}"