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
13
Merge Requests
13
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.package
Commits
9b7ee87e
Commit
9b7ee87e
authored
Jul 21, 2015
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'master'
Improvemnts for Centos See merge request !7
parents
23ff603b
a56f07e3
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
56 additions
and
10 deletions
+56
-10
playbook/imt-vm-bootstrap.yml
playbook/imt-vm-bootstrap.yml
+1
-1
playbook/imt-vm-cloudera-manager.yml
playbook/imt-vm-cloudera-manager.yml
+1
-1
playbook/roles/install-script/templates/base_setup.j2
playbook/roles/install-script/templates/base_setup.j2
+4
-1
playbook/roles/ntp/tasks/main.yml
playbook/roles/ntp/tasks/main.yml
+3
-3
playbook/roles/vm-bootstrap/handlers/main.yml
playbook/roles/vm-bootstrap/handlers/main.yml
+7
-2
playbook/roles/vm-bootstrap/tasks/main.yml
playbook/roles/vm-bootstrap/tasks/main.yml
+1
-0
playbook/roles/vm-bootstrap/tasks/rerun.yml
playbook/roles/vm-bootstrap/tasks/rerun.yml
+29
-0
playbook/roles/vm-bootstrap/tasks/ssh.yml
playbook/roles/vm-bootstrap/tasks/ssh.yml
+2
-0
playbook/roles/vm-bootstrap/templates/start-script.j2
playbook/roles/vm-bootstrap/templates/start-script.j2
+6
-0
playbook/roles/vm-cloudera-manager/tasks/main.yml
playbook/roles/vm-cloudera-manager/tasks/main.yml
+2
-2
No files found.
playbook/imt-vm-bootstrap.yml
View file @
9b7ee87e
...
...
@@ -3,7 +3,7 @@
connection
:
local
roles
:
-
vm-bootstrap
-
{
role
:
vm-bootstrap
,
startup_playbook_id
:
imt-vm-bootstrap.yml
}
-
ntp
-
{
role
:
vm-disks
,
vd_disk
:
b
,
data_n
:
1
}
-
{
role
:
vm-disks
,
vd_disk
:
c
,
data_n
:
2
}
...
...
playbook/imt-vm-cloudera-manager.yml
View file @
9b7ee87e
...
...
@@ -3,6 +3,6 @@
connection
:
local
roles
:
-
vm-bootstrap
-
{
role
:
vm-bootstrap
,
startup_playbook_id
:
imt-vm-bootstrap.yml
}
-
ntp
-
vm-cloudera-manager
playbook/roles/install-script/templates/base_setup.j2
View file @
9b7ee87e
{{ lookup('file', 'roles/install-script/files/function-common') }}
export PATH=$PATH:/usr/local/bin:/usr/local/sbin
# XXX a bit brutal but otherwise it cannot work, without tty enabled.
sed -i "/requiretty/d" /etc/sudoers
# Include Additional Functions
function download_playbook {
if [ ! -f /etc/opt/slapcache.cfg ]; then
...
...
@@ -92,6 +94,7 @@ EOF
fi
if is_fedora && [[ $DISTRO == "rhel6" ]]; then
sed -i "/requiretty/d" /etc/sudoers
if sudo yum repolist enabled epel | grep -q 'epel'; then
uninstall_package epel-release || true
fi
...
...
playbook/roles/ntp/tasks/main.yml
View file @
9b7ee87e
---
-
name
:
Install ntp
apt
:
name=ntp state=latest
apt
:
name=ntp state=latest
update_cache=no
when
:
ansible_os_family == "Debian"
-
name
:
Install ntp
yum
:
name=ntp state=latest
yum
:
name=ntp state=latest
update_cache=no
when
:
ansible_os_family == "RedHat"
-
name
:
ensure ntp is runing
...
...
playbook/roles/vm-bootstrap/handlers/main.yml
View file @
9b7ee87e
...
...
@@ -2,3 +2,8 @@
-
name
:
restart ssh
service
:
name=ssh state=restarted
when
:
ansible_os_family == "Debian"
-
name
:
restart sshd
service
:
name=sshd state=restarted
when
:
ansible_os_family == "RedHat"
playbook/roles/vm-bootstrap/tasks/main.yml
View file @
9b7ee87e
...
...
@@ -23,3 +23,4 @@
-
include
:
user.yml
-
include
:
sudo.yml
-
include
:
ssh.yml
-
include
:
rerun.yml
playbook/roles/vm-bootstrap/tasks/rerun.yml
0 → 100644
View file @
9b7ee87e
---
-
name
:
Add startup script
template
:
src=start-script.j2 dest=/usr/local/bin/vm-bootstrap-update mode=755
-
name
:
Add a periodical update on the VM
cron
:
name="Update vm bootstrap"
minute="*/12"
job="/usr/local/bin/vm-bootstrap-update"
-
name
:
Check if /opt/slapos.playbook already exists
file
:
path=/opt/slapos.playbook/ state=directory
-
name
:
check if playbook is there
stat
:
path=/opt/slapos.playbook/playbook.tar.gz
register
:
playbook_archive
-
name
:
Download playbook
shell
:
slapcache-download --destination=playbook.tar.gz
when
:
playbook_archive.stat.exists == False
args
:
chdir
:
/opt/slapos.playbook
-
name
:
Copy slapos.playbook
shell
:
tar -xzvf /opt/slapos.playbook/playbook.tar.gz
when
:
playbook_archive.stat.exists == False
args
:
chdir
:
/opt/slapos.playbook
playbook/roles/vm-bootstrap/tasks/ssh.yml
View file @
9b7ee87e
...
...
@@ -25,8 +25,10 @@
lineinfile
:
dest=/etc/ssh/sshd_config regexp="^PermitRootLogin (?!no)" line="PermitRootLogin no"
notify
:
-
restart ssh
-
restart sshd
-
name
:
update /etc/ssh/sshd_config
lineinfile
:
dest=/etc/ssh/sshd_config line="PermitRootLogin no"
notify
:
-
restart ssh
-
restart sshd
playbook/roles/vm-bootstrap/templates/start-script.j2
0 → 100644
View file @
9b7ee87e
#!/bin/bash
# Reruns the ansible playbook, does nothing else
cd
/opt/slapos.playbook
ansible-playbook
{{
startup_playbook_id
}}
-i
hosts
--connection
=
local
playbook/roles/vm-cloudera-manager/tasks/main.yml
View file @
9b7ee87e
...
...
@@ -19,10 +19,10 @@
raw
:
"
apt-get
install
-y
python-apt"
-
name
:
install sudo
apt
:
name=sudo state=latest
apt
:
name=sudo state=latest
update_cache=no
-
name
:
install tree
apt
:
name=tree state=latest
apt
:
name=tree state=latest
update_cache=no
-
name
:
install curl
apt
:
name=curl state=latest
...
...
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