Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Gitlab Omnibus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tools
Ansible
Roles
Gitlab Omnibus
Commits
a9f2c5e2
Commit
a9f2c5e2
authored
3 years ago
by
Дмитрий Сафронов
Browse files
Options
Downloads
Patches
Plain Diff
test
parent
a116bc35
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tasks/ubuntu/main.yml
+19
-12
19 additions, 12 deletions
tasks/ubuntu/main.yml
with
19 additions
and
12 deletions
tasks/ubuntu/main.yml
+
19
−
12
View file @
a9f2c5e2
...
...
@@ -43,7 +43,7 @@
pkg
:
-
gitlab-ce
-
name
:
Create a directory for
external config
s
-
name
:
Create a directory for
config backup
s
ansible.builtin.file
:
path
:
"
/opt/gitlab.rb"
state
:
directory
...
...
@@ -51,22 +51,29 @@
group
:
root
mode
:
'
0755'
-
name
:
Temp
late
a file to /opt/gitlab.rb/_version_
-
name
:
Popu
late
gitlab config
ansible.builtin.copy
:
content
:
|
{{ gitlab_config }}
dest
:
"
/
opt
/gitlab.rb/
{{
config_date_time
}}
"
dest
:
"
/
etc/gitlab
/gitlab.rb/"
owner
:
root
group
:
root
mode
:
'
0644'
backup
:
yes
register
:
gitlab_config
notify
:
Reconfigure gitlab
-
debug
:
var=gitlab_config.backup_file
-
name
:
Backup previous gitlab config
ansible.builtin.copy
:
dest
:
"
/opt/gitlab.rb"
src
:
"
{{
gitlab_config.backup_file
}}"
remote_src
:
true
when
:
gitlab_config.changed
-
name
:
Create a hard link to /opt/gitlab.rb/_version_
-
name
:
Remove backup file from gitlab config dir
ansible.builtin.file
:
src
:
"
/opt/gitlab.rb/{{
config_date_time
}}"
dest
:
/etc/gitlab/gitlab.rb
owner
:
root
group
:
root
mode
:
'
0644'
state
:
hard
force
:
yes
notify
:
Reconfigure gitlab
path
:
"
{{
gitlab_config.backup_file
}}"
state
:
absent
when
:
gitlab_config.changed
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