Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ippidb-web
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
iPPIDB
ippidb-web
Commits
21144dbb
Commit
21144dbb
authored
7 years ago
by
Hervé MENAGER
Browse files
Options
Downloads
Patches
Plain Diff
restructure system.yaml ansible file
Former-commit-id: a959420df90ee156872d7940ffd86faa5fac7bf9
parent
6192d7f3
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
ansible/system.yaml
+34
-21
34 additions, 21 deletions
ansible/system.yaml
with
34 additions
and
21 deletions
ansible/system.yaml
+
34
−
21
View file @
21144dbb
...
@@ -2,6 +2,12 @@
...
@@ -2,6 +2,12 @@
-
hosts
:
all
-
hosts
:
all
gather_facts
:
no
gather_facts
:
no
tasks
:
tasks
:
#
# User and Group configuration
#
# application user ({{deploy_user_name}}) is created
# in the wheel group, which has to be passwordless sudo
# and upload the key as a deploy key to gitlab
-
name
:
Make sure we have a 'wheel' group
-
name
:
Make sure we have a 'wheel' group
become
:
true
become
:
true
group
:
group
:
...
@@ -17,16 +23,23 @@
...
@@ -17,16 +23,23 @@
-
name
:
Create {{ deploy_user_name }} user
-
name
:
Create {{ deploy_user_name }} user
user
:
name={{ deploy_user_name }} groups=wheel append=yes state=present createhome=yes generate_ssh_key=yes ssh_key_bits=2048 ssh_key_file=.ssh/id_rsa
user
:
name={{ deploy_user_name }} groups=wheel append=yes state=present createhome=yes generate_ssh_key=yes ssh_key_bits=2048 ssh_key_file=.ssh/id_rsa
become
:
true
become
:
true
-
name
:
install git
-
name
:
Cat deployer's user public key
yum
:
name=git state=present
shell
:
"
cat
/home/{{
deploy_user_name
}}/.ssh/id_rsa.pub"
register
:
key_value
become
:
true
become
:
true
-
name
:
Add repository
-
name
:
Create ssh_key json
template
:
src=ssh_key.json.j2 dest=/home/{{ deploy_user_name }}/ssh_key.json group={{ deploy_user_name }} owner={{ deploy_user_name }} force=yes
become
:
true
become
:
true
yum_repository
:
-
name
:
Cat deployer's user public key
name
:
epel
shell
:
"
cat
/home/{{
deploy_user_name
}}/ssh_key.json"
description
:
EPEL YUM repo
become
:
true
gpgcheck
:
no
-
name
:
Upload deploy keys to gitlab
baseurl
:
https://download.fedoraproject.org/pub/epel/$releasever/$basearch/
shell
:
"
curl
-X
POST
-H
'Accept:
application/json'
-H
'Content-type:
application/json'
-H
'PRIVATE-TOKEN:
{{
repo_api_token
}}'
--data-binary
@/home/{{
deploy_user_name
}}/ssh_key.json
https://gitlab.pasteur.fr/api/v3/projects/198/keys"
become
:
true
#
# Security configuration
#
# disable SELinux, and open firewall to incoming http
-
name
:
disable SELinux
-
name
:
disable SELinux
become
:
true
become
:
true
selinux
:
selinux
:
...
@@ -37,6 +50,19 @@
...
@@ -37,6 +50,19 @@
permanent
:
true
permanent
:
true
state
:
enabled
state
:
enabled
become
:
true
become
:
true
#
# Install basic non-virtualenv requirements
#
-
name
:
install git
yum
:
name=git state=present
become
:
true
-
name
:
Add repository
become
:
true
yum_repository
:
name
:
epel
description
:
EPEL YUM repo
gpgcheck
:
no
baseurl
:
https://download.fedoraproject.org/pub/epel/$releasever/$basearch/
-
name
:
install python3
-
name
:
install python3
yum
:
name=python34 state=present update_cache=yes
yum
:
name=python34 state=present update_cache=yes
become
:
true
become
:
true
...
@@ -69,16 +95,3 @@
...
@@ -69,16 +95,3 @@
name
:
"
@Development
tools"
name
:
"
@Development
tools"
state
:
present
state
:
present
become
:
true
become
:
true
-
name
:
Cat deployer's user public key
shell
:
"
cat
/home/{{
deploy_user_name
}}/.ssh/id_rsa.pub"
register
:
key_value
become
:
true
-
name
:
Create ssh_key json
template
:
src=ssh_key.json.j2 dest=/home/{{ deploy_user_name }}/ssh_key.json group={{ deploy_user_name }} owner={{ deploy_user_name }} force=yes
become
:
true
-
name
:
Cat deployer's user public key
shell
:
"
cat
/home/{{
deploy_user_name
}}/ssh_key.json"
become
:
true
-
name
:
Upload deploy keys to gitlab
shell
:
"
curl
-X
POST
-H
'Accept:
application/json'
-H
'Content-type:
application/json'
-H
'PRIVATE-TOKEN:
{{
repo_api_token
}}'
--data-binary
@/home/{{
deploy_user_name
}}/ssh_key.json
https://gitlab.pasteur.fr/api/v3/projects/198/keys"
become
:
true
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