|
14 | 14 | - name: "Prepare Debian GitLab installation" |
15 | 15 | when: "ansible_facts.os_family == 'Debian'" |
16 | 16 | block: |
17 | | - - name: "Remove APT GPG key" |
| 17 | + - name: "Remove GitLab APT GPG key from legacy trusted.gpg keyring" |
18 | 18 | ansible.builtin.apt_key: |
19 | 19 | url: "{{ gitlab_gpg_key_url }}" |
20 | 20 | id: "{{ gitlab_gpg_key_id }}" |
21 | 21 | state: "absent" |
22 | 22 | when: "not gitlab_is_initial_dryrun" |
23 | 23 |
|
| 24 | + - name: "Remove GitLab APT repository from sources.list" |
| 25 | + ansible.builtin.apt_repository: |
| 26 | + repo: "deb {{ gitlab_repo_url }} {{ ansible_facts.distribution_release }} main" |
| 27 | + state: "absent" |
| 28 | + filename: "gitlab_{{ gitlab_edition }}" |
| 29 | + |
| 30 | + - name: "Remove GitLab source APT repository from sources.list" |
| 31 | + ansible.builtin.apt_repository: |
| 32 | + repo: "deb-src {{ gitlab_repo_url }} {{ ansible_facts.distribution_release }} main" |
| 33 | + state: "absent" |
| 34 | + filename: "gitlab_{{ gitlab_edition }}" |
| 35 | + |
24 | 36 | - name: "Add GitLab APT repository" |
25 | 37 | ansible.builtin.deb822_repository: |
26 | 38 | name: "{{ gitlab_edition }}" |
27 | | - types: "deb" |
| 39 | + types: |
| 40 | + - "deb" |
| 41 | + - "deb-src" |
28 | 42 | uris: "{{ gitlab_repo_url }}" |
29 | | - suites: "{{ ansible_facts.distribution_release }}" |
| 43 | + suites: "{{ ansible_facts.distribution_release | lower }}" |
30 | 44 | components: "main" |
31 | 45 | signed_by: "{{ gitlab_gpg_key_url }}" |
| 46 | + architectures: "amd64" |
32 | 47 | state: "present" |
33 | 48 | mode: "0644" |
34 | 49 | enabled: true |
35 | 50 |
|
36 | | - - name: "Remove GitLab source APT repository" |
37 | | - ansible.builtin.apt_repository: |
38 | | - repo: "deb-src {{ gitlab_repo_url }} {{ ansible_facts.distribution_release }} main" |
39 | | - state: "absent" |
40 | | - filename: "gitlab_{{ gitlab_edition }}" |
41 | | - mode: "0644" |
42 | | - |
43 | 51 | - name: "Update APT package cache" |
44 | 52 | ansible.builtin.apt: |
45 | 53 | update_cache: true |
46 | | - cache_valid_time: 3600 |
47 | | - register: "gitlab_apt_cache" |
48 | 54 | check_mode: false |
49 | | - changed_when: |
50 | | - - "gitlab_apt_cache.cache_updated" |
51 | | - - "not ansible_check_mode" |
| 55 | + changed_when: false |
52 | 56 |
|
53 | 57 | - name: "Install GitLab on RedHat Like OS" |
54 | 58 | when: "ansible_facts.os_family == 'RedHat'" |
|
0 commit comments