- 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