Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gitlab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
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
Ansible
Roles
gitlab
Commits
ee5d98ec
Commit
ee5d98ec
authored
9 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Replace deprecated "sudo" with "become"
parent
1173c3e7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tasks/main.yml
+20
-20
20 additions, 20 deletions
tasks/main.yml
with
20 additions
and
20 deletions
tasks/main.yml
+
20
−
20
View file @
ee5d98ec
---
-
name
:
install prerequisites
sudo
:
yes
become
:
yes
apt
:
name
:
"
{{
item}}"
state
:
present
...
...
@@ -25,7 +25,7 @@
-
nginx
-
name
:
create git user
sudo
:
yes
become
:
yes
user
:
name
:
git
comment
:
"
GitLab"
...
...
@@ -33,7 +33,7 @@
state
:
present
-
name
:
configure git
sudo
:
yes
become
:
yes
copy
:
src
:
gitconfig
dest
:
/home/git/.gitconfig
...
...
@@ -42,7 +42,7 @@
mode
:
0664
-
name
:
create database user
sudo
:
yes
become
:
yes
sudo_user
:
postgres
postgresql_user
:
name
:
git
...
...
@@ -50,7 +50,7 @@
state
:
present
-
name
:
create database table
sudo
:
yes
become
:
yes
sudo_user
:
postgres
postgresql_db
:
name
:
gitlabhq_production
...
...
@@ -58,7 +58,7 @@
state
:
present
-
name
:
clone gitlab source
sudo
:
yes
become
:
yes
sudo_user
:
git
git
:
repo
:
https://gitlab.com/gitlab-org/gitlab-ce.git
...
...
@@ -96,7 +96,7 @@
-
{
key
:
"
email_reply_to"
,
value
:
"
{{
gitlab_config_email_reply_to
}}"
}
-
name
:
setup folder permissions
sudo
:
yes
become
:
yes
file
:
path
:
"
{{
item
}}"
state
:
directory
...
...
@@ -110,25 +110,25 @@
-
/home/git/gitlab-satellites
-
name
:
reduce permissions for log directory
sudo
:
yes
become
:
yes
file
:
path
:
/home/git/gitlab/log
mode
:
go-w
-
name
:
reduce permissions for database config
sudo
:
yes
become
:
yes
file
:
path
:
/home/git/gitlab/config/database.yml
mode
:
o-rwx
-
name
:
reduce permissions for gitlab-satellites directory
sudo
:
yes
become
:
yes
file
:
path
:
/home/git/gitlab-satellites
mode
:
g=rx,o-rwx
-
name
:
install gems
sudo
:
yes
become
:
yes
sudo_user
:
git
command
:
bundle install -j8 --deployment --without development test mysql aws kerberos
args
:
...
...
@@ -136,7 +136,7 @@
when
:
result | changed
-
name
:
install gitlab shell
sudo
:
yes
become
:
yes
sudo_user
:
git
command
:
bundle exec rake gitlab:shell:install[v2.6.3] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production
args
:
...
...
@@ -144,7 +144,7 @@
when
:
result | changed
-
name
:
initialize database
sudo
:
yes
become
:
yes
sudo_user
:
git
command
:
echo yes | bundle exec rake gitlab:setup RAILS_ENV=production
args
:
...
...
@@ -162,13 +162,13 @@
enabled
:
yes
-
name
:
setup logrotate
sudo
:
yes
become
:
yes
command
:
cp /home/git/gitlab/lib/support/logrotate/gitlab /etc/logrotate.d/gitlab
args
:
creates
:
/etc/logrotate.d/gitlab
-
name
:
compile assets
sudo
:
yes
become
:
yes
sudo_user
:
git
command
:
bundle exec rake assets:precompile RAILS_ENV=production
args
:
...
...
@@ -176,25 +176,25 @@
when
:
result | changed
-
name
:
start gitlab instance
sudo
:
yes
become
:
yes
service
:
name
:
gitlab
state
:
running
-
name
:
copy nginx configuration from gitlab
sudo
:
yes
become
:
yes
command
:
cp /home/git/gitlab/lib/support/nginx/gitlab /etc/nginx/sites-available/gitlab
args
:
creates
:
/etc/nginx/sites-available/gitlab
-
name
:
activate nginx gitlab site
sudo
:
yes
become
:
yes
command
:
ln -s /etc/nginx/sites-available/gitlab /etc/nginx/sites-enabled/gitlab
args
:
creates
:
/etc/nginx/sites-enabled/gitlab
-
name
:
deactivate nginx default site
sudo
:
yes
become
:
yes
command
:
rm -f /etc/nginx/sites-enabled/default
-
name
:
set FQND in gitlab config
...
...
@@ -204,7 +204,7 @@
replace
:
"
{{
gitlab_config_host
}}"
-
name
:
restart nginx
sudo
:
yes
become
:
yes
service
:
name
:
nginx
state
:
restarted
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