Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Boxiang Sun
slapos.package
Commits
bf925ade
Commit
bf925ade
authored
Apr 24, 2018
by
Alain Takoudjou
Committed by
Alain Takoudjou
Apr 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update vm-bootstrap
parent
a46f452a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
13 deletions
+50
-13
playbook/roles/vm-bootstrap/tasks/hostname.yml
playbook/roles/vm-bootstrap/tasks/hostname.yml
+3
-13
playbook/vm-bootstrap.yml
playbook/vm-bootstrap.yml
+47
-0
No files found.
playbook/roles/vm-bootstrap/tasks/hostname.yml
View file @
bf925ade
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
when
:
hostname_file.stat.exists == True
when
:
hostname_file.stat.exists == True
-
name
:
setting hosts special line
-
name
:
setting hosts special line
lineinfile
:
dest=/etc/hosts line="{{ lookup('file', '/etc/opt/ipv4') }} {{ lookup('file', '/etc/opt/hostname') }}.
tl.teralab-datascience.fr
{{ lookup('file', '/etc/opt/hostname') }}"
lineinfile
:
dest=/etc/hosts line="{{ lookup('file', '/etc/opt/ipv4') }} {{ lookup('file', '/etc/opt/hostname') }}.
rapid.space
{{ lookup('file', '/etc/opt/hostname') }}"
when
:
hostname_file.stat.exists == True
when
:
hostname_file.stat.exists == True
-
name
:
setting cluster
-
name
:
setting cluster
...
@@ -50,21 +50,11 @@
...
@@ -50,21 +50,11 @@
register
:
hosts_file
register
:
hosts_file
-
name
:
Format hosts
-
name
:
Format hosts
script
:
format_hosts /tmp/hosts
tl.teralab-datascience.fr
script
:
format_hosts /tmp/hosts
rapid.space
when
:
cluster_hash.stat.exists == True
when
:
cluster_hash.stat.exists == True
-
name
:
managing resolv.conf file
-
name
:
managing resolv.conf file
lineinfile
:
dest=/etc/resolv.conf line="search tl.teralab-datascience.fr"
lineinfile
:
dest=/etc/resolv.conf line="nameserver 8.8.8.8"
-
name
:
adding entry from workspace
lineinfile
:
dest=/etc/resolv.conf line="nameserver 10.200.218.1"
-
name
:
Delete default nameserver
lineinfile
:
dest=/etc/resolv.conf line="nameserver 10.0.2.3" state=absent
-
name
:
Delete nameserver 8.8.8.8
lineinfile
:
dest=/etc/resolv.conf line="nameserver 8.8.8.8" state=absent
when
:
is_playbook_ok in [False, "False"]
-
name
:
Turn off dhclient if it's running
-
name
:
Turn off dhclient if it's running
shell
:
pkill dhclient
shell
:
pkill dhclient
...
...
playbook/vm-bootstrap.yml
0 → 100644
View file @
bf925ade
-
name
:
a play that runs entirely on the ansible host
hosts
:
127.0.0.1
connection
:
local
pre_tasks
:
-
name
:
Get mounted disk list
script
:
roles/vm-bootstrap/files/mounted_disk
register
:
vd_list
-
name
:
resgister completed variable
stat
:
path=/etc/opt/vm-bootstrap-completed
register
:
ansible_completed
vars
:
is_playbook_ok
:
"
{{
ansible_completed.stat.exists
}}"
logrotate_args
:
-
name
:
vm-bootstrap
path
:
/var/log/vm-bootstrap.log
options
:
-
weekly
-
compress
-
rotate
5
-
notifempty
-
create
-
dateext
roles
:
-
{
role
:
vm-bootstrap
,
startup_playbook_id
:
imt-vm-bootstrap.yml
}
-
ntp
-
{
role
:
vm-disks
,
vd_disk
:
b
,
data_n
:
1
,
when
:
vd_list.stdout.find("vdb") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
c
,
data_n
:
2
,
when
:
vd_list.stdout.find("vdc") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
d
,
data_n
:
3
,
when
:
vd_list.stdout.find("vdd") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
e
,
data_n
:
4
,
when
:
vd_list.stdout.find("vde") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
f
,
data_n
:
5
,
when
:
vd_list.stdout.find("vdf") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
g
,
data_n
:
6
,
when
:
vd_list.stdout.find("vdg") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
h
,
data_n
:
7
,
when
:
vd_list.stdout.find("vdh") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
i
,
data_n
:
8
,
when
:
vd_list.stdout.find("vdi") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
j
,
data_n
:
9
,
when
:
vd_list.stdout.find("vdj") != -1
}
-
{
role
:
vm-disks
,
vd_disk
:
k
,
data_n
:
10
,
when
:
vd_list.stdout.find("vdk") != -1
}
-
role
:
logrotate
logrotate_scripts
:
"
{{
logrotate_args
}}"
when
:
ansible_completed.stat.exists == False
tasks
:
-
name
:
Set tasks complete
file
:
path=/etc/opt/vm-bootstrap-completed state=touch
when
:
ansible_completed.stat.exists == False
changed_when
:
false
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment