File tree Expand file tree Collapse file tree 4 files changed +7
-15
lines changed Expand file tree Collapse file tree 4 files changed +7
-15
lines changed Original file line number Diff line number Diff line change 66---
77- name : " Converge"
88 hosts : " all"
9+ become : false
910 tasks :
1011 - name : " Include gitlab role"
1112 ansible.builtin.include_role :
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ platforms:
1313 image : " ${MOLECULE_IMAGE:-ghcr.io/hifis-net/ubuntu-systemd:24.04}"
1414 pre_build_image : true
1515 privileged : true
16- systemd : " always "
16+ systemd : true
1717 tty : true
1818 override_command : false
1919provisioner :
@@ -29,6 +29,7 @@ provisioner:
2929 inventory :
3030 host_vars :
3131 instancegitlab :
32+ ansible_user : " ansible"
3233 gitlab_edition : " gitlab-ce"
3334 gitlab_ip_range : " 0.0.0.0/0"
3435 gitlab_additional_configurations :
Original file line number Diff line number Diff line change 1313 - " ansible_facts.distribution_major_version | int >= 7"
1414 block :
1515 - name : " Install missing dependencies"
16+ become : true
1617 ansible.builtin.dnf :
1718 name :
1819 - " sudo"
2122 state : " present"
2223 update_cache : true
2324
24- # Workaround to prevent "sudo: PAM account management error" because of non-readable shadows file on AlmaLinux
25- - name : " Get file stats for /etc/shadow"
26- ansible.builtin.stat :
27- path : " /etc/shadow"
28- register : " shadow"
29-
30- - name : " Fix permissions for /etc/shadow"
31- ansible.builtin.file :
32- path : " /etc/shadow"
33- owner : " root"
34- group : " {{ shadow.stat.gr_name }}"
35- mode : " 0640"
36- when : " not shadow.stat.rusr"
37-
3825 - name : " Install depenencies for OS family Debian"
3926 when : " ansible_facts.os_family == 'Debian'"
4027 block :
4128 - name : " Install missing dependencies"
29+ become : true
4230 ansible.builtin.apt :
4331 name :
4432 - " sudo" # for `become` privilege escalation
Original file line number Diff line number Diff line change 5454 failed_when : " liveness_check.status == 503"
5555
5656 - name : " Check the output of gitlab status"
57+ become : true
5758 ansible.builtin.command : " gitlab-ctl status"
5859 register : " gitlab_ctl_status"
5960 changed_when : " gitlab_ctl_status.rc != 0"
6061 failed_when : " gitlab_ctl_status.rc != 0"
6162
6263 - name : " Check GitLab configuration via Rake task"
64+ become : true
6365 ansible.builtin.command : " gitlab-rake gitlab:check"
6466 register : " gitlab_rake_check"
6567 changed_when : " gitlab_rake_check.rc != 0"
You can’t perform that action at this time.
0 commit comments