This repository has been archived on 2025-04-19. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
gitlab/tasks.yml

60 lines
1.2 KiB
YAML

- name: copy gitlab firewall template
template:
src: 'templates/nftables.j2'
dest: '/etc/nftables.conf'
owner: root
group: root
mode: '0600'
notify: restart nftables
- name: create gitlab config dir
file:
path: /etc/gitlab
state: directory
owner: root
group: root
mode: '0644'
- name: copy gitlab config
template:
src: 'templates/gitlab.j2'
dest: '/etc/gitlab/gitlab.rb'
owner: root
group: root
mode: '0600'
- name: copy postfix config
template:
src: 'templates/postfix.j2'
dest: '/etc/postfix/main.cf'
owner: root
group: root
mode: '0644'
notify: restart postfix
- name: check installed packages
package_facts:
manager: apt
- name: download gitlab setup script
get_url:
url: '{{ gitlab_setup_script }}'
dest: /tmp/
mode: '0750'
when: "'gitlab-ee' not in ansible_facts.packages"
- name: run gitlab setup script
command: /tmp/script.deb.sh
when: "'gitlab-ee' not in ansible_facts.packages"
- name: install gitlab
apt:
name: 'gitlab-ee'
update_cache: true
state: latest
register: package_install
# Updates reconfigure automatically
- name: reconfigure gitlab
command: 'gitlab-ctl reconfigure'
when: not package_install.changed