Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Gitlab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSI Ansible
Gitlab
Commits
a4f6bde9
Commit
a4f6bde9
authored
Jun 8, 2023
by
Felix Schäfer
Browse files
Options
Downloads
Patches
Plain Diff
ansible lint
parent
e7cddad4
No related branches found
No related tags found
No related merge requests found
Pipeline
#168750
passed
Jun 8, 2023
Stage: linting
Changes
3
Pipelines
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
handlers/main.yml
+3
-2
3 additions, 2 deletions
handlers/main.yml
tasks/main.yml
+15
-10
15 additions, 10 deletions
tasks/main.yml
tasks/plantuml.yml
+1
-1
1 addition, 1 deletion
tasks/plantuml.yml
with
19 additions
and
13 deletions
handlers/main.yml
+
3
−
2
View file @
a4f6bde9
---
---
-
name
:
r
estart gitlab
-
name
:
R
estart gitlab
ansible.builtin.command
:
gitlab-ctl reconfigure
ansible.builtin.command
:
gitlab-ctl reconfigure
register
:
gitlab_restart
register
:
gitlab_restart
failed_when
:
'
gitlab_restart.rc
!=
0'
failed_when
:
gitlab_restart.rc !=
0
changed_when
:
gitlab_restart.rc !=
0
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
15
−
10
View file @
a4f6bde9
...
@@ -11,11 +11,13 @@
...
@@ -11,11 +11,13 @@
when
:
gitlab_external_postgres
when
:
gitlab_external_postgres
-
name
:
Check if GitLab configuration file already exists.
-
name
:
Check if GitLab configuration file already exists.
ansible.builtin.stat
:
path=/etc/gitlab/gitlab.rb
ansible.builtin.stat
:
path
:
/etc/gitlab/gitlab.rb
register
:
gitlab_config_file
register
:
gitlab_config_file
-
name
:
Check if GitLab is already installed.
-
name
:
Check if GitLab is already installed.
ansible.builtin.stat
:
path=/usr/bin/gitlab-ctl
ansible.builtin.stat
:
path
:
/usr/bin/gitlab-ctl
register
:
gitlab_file
register
:
gitlab_file
# Install GitLab and its dependencies.
# Install GitLab and its dependencies.
...
@@ -24,12 +26,14 @@
...
@@ -24,12 +26,14 @@
url
:
"
{{
gitlab_repository_installation_script_url
}}"
url
:
"
{{
gitlab_repository_installation_script_url
}}"
dest
:
/tmp/gitlab_install_repository.sh
dest
:
/tmp/gitlab_install_repository.sh
validate_certs
:
"
{{
gitlab_download_validate_certs
}}"
validate_certs
:
"
{{
gitlab_download_validate_certs
}}"
mode
:
0700
mode
:
'
0700
'
when
:
not gitlab_file.stat.exists
when
:
not gitlab_file.stat.exists
-
name
:
Install GitLab repository
-
name
:
Install GitLab repository
ansible.builtin.command
:
bash /tmp/gitlab_install_repository.sh
ansible.builtin.command
:
bash /tmp/gitlab_install_repository.sh
when
:
not gitlab_file.stat.exists
when
:
not gitlab_file.stat.exists
register
:
gitlab_install
changed_when
:
gitlab_install.rc !=
0
-
name
:
Add GitLab apt signing key
-
name
:
Add GitLab apt signing key
ansible.builtin.apt_key
:
ansible.builtin.apt_key
:
...
@@ -62,14 +66,14 @@
...
@@ -62,14 +66,14 @@
dest
:
/etc/gitlab/gitlab.rb
dest
:
/etc/gitlab/gitlab.rb
owner
:
root
owner
:
root
group
:
root
group
:
root
mode
:
0600
mode
:
'
0600
'
notify
:
r
estart gitlab
notify
:
R
estart gitlab
-
name
:
Copy gitlab-dump service
-
name
:
Copy gitlab-dump service
ansible.builtin.template
:
ansible.builtin.template
:
src
:
gitlab_dump.service.j2
src
:
gitlab_dump.service.j2
dest
:
/etc/systemd/system/gitlab_dump.service
dest
:
/etc/systemd/system/gitlab_dump.service
mode
:
0644
mode
:
'
0644
'
when
:
gitlab_use_borgbackup
when
:
gitlab_use_borgbackup
-
name
:
Enable gitlab-dump service
-
name
:
Enable gitlab-dump service
...
@@ -114,7 +118,7 @@
...
@@ -114,7 +118,7 @@
ansible.builtin.template
:
ansible.builtin.template
:
src
:
etc_apt_preferences.d_apt_postgresql_org_pub_repos_apt.pref.j2
src
:
etc_apt_preferences.d_apt_postgresql_org_pub_repos_apt.pref.j2
dest
:
/etc/apt/preferences.d/apt_postgresql_org_pub_repos_apt.pref
dest
:
/etc/apt/preferences.d/apt_postgresql_org_pub_repos_apt.pref
mode
:
0644
mode
:
'
0644
'
-
name
:
PostgreSQL | Install PostgreSQL client tools
-
name
:
PostgreSQL | Install PostgreSQL client tools
ansible.builtin.apt
:
ansible.builtin.apt
:
...
@@ -129,7 +133,7 @@
...
@@ -129,7 +133,7 @@
src
:
'
/usr/bin/{{
item
}}'
src
:
'
/usr/bin/{{
item
}}'
dest
:
'
/opt/gitlab/bin/{{
item
}}'
dest
:
'
/opt/gitlab/bin/{{
item
}}'
state
:
link
state
:
link
mode
:
0777
mode
:
'
0777
'
with_items
:
with_items
:
-
pg_dump
-
pg_dump
-
psql
-
psql
...
@@ -139,7 +143,7 @@
...
@@ -139,7 +143,7 @@
ansible.builtin.copy
:
ansible.builtin.copy
:
src
:
"
{{
item
}}"
src
:
"
{{
item
}}"
dest
:
"
/etc/systemd/system/"
dest
:
"
/etc/systemd/system/"
mode
:
0644
mode
:
'
0644
'
with_fileglob
:
"
gitlab_registry_cleanup.*"
with_fileglob
:
"
gitlab_registry_cleanup.*"
-
name
:
Enable registry cleanup timer
-
name
:
Enable registry cleanup timer
...
@@ -149,5 +153,6 @@
...
@@ -149,5 +153,6 @@
state
:
started
state
:
started
daemon-reload
:
true
daemon-reload
:
true
-
import_tasks
:
plantuml.yml
-
name
:
Install PlantUML
ansible.builtin.import_tasks
:
plantuml.yml
when
:
gitlab_enable_plantuml
when
:
gitlab_enable_plantuml
This diff is collapsed.
Click to expand it.
tasks/plantuml.yml
+
1
−
1
View file @
a4f6bde9
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
update_cache
:
true
update_cache
:
true
-
name
:
Start PlantUML docker container
-
name
:
Start PlantUML docker container
ansible.builtin
.docker_container
:
community.docker
.docker_container
:
name
:
plantuml
name
:
plantuml
image
:
plantuml/plantuml-server:tomcat
image
:
plantuml/plantuml-server:tomcat
state
:
started
state
:
started
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment