Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
feat: Added GitLab Update feature
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianocasella committed Aug 31, 2023
1 parent e1a13cd commit 96d3f34
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
- name: Install GitLab dependencies.
package:
name: "{{ gitlab_dependencies }}"
state: present
state: latest

- name: Install GitLab dependencies (Debian).
apt:
name: gnupg2
state: present
state: latest
when: ansible_os_family == 'Debian'

- name: Download GitLab repository installation script.
Expand All @@ -39,13 +39,21 @@
gitlab_package_name: "{{ gitlab_edition }}{{ gitlab_package_version_separator }}{{ gitlab_version }}"
when: gitlab_version | default(false)

- name: Install GitLab
- name: Install GitLab specific version
package:
name: "{{ gitlab_package_name | default(gitlab_edition) }}"
name: "{{ gitlab_package_name }}"
state: present
async: 300
async: 3000
poll: 5
when: not gitlab_file.stat.exists
when: (gitlab_version is defined) and (gitlab_version|length > 0)

- name: Install GitLab latest version
package:
name: "{{ gitlab_edition }}"
state: latest
async: 3000
poll: 5
when: (gitlab_version is not defined) or (gitlab_version|length == 0)

# Start and configure GitLab. Sometimes the first run fails, but after that,
# restarts fix problems, so ignore failures on this run.
Expand Down

0 comments on commit 96d3f34

Please sign in to comment.