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
Ayush Tiwari
slapos.package
Commits
0e471d42
Commit
0e471d42
authored
Jul 03, 2017
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook: fix some warning messages
parent
a55deca6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
22 deletions
+17
-22
playbook/roles/ntp/tasks/main.yml
playbook/roles/ntp/tasks/main.yml
+2
-2
playbook/roles/vm-bootstrap/tasks/hostname.yml
playbook/roles/vm-bootstrap/tasks/hostname.yml
+7
-2
playbook/roles/vm-bootstrap/tasks/main.yml
playbook/roles/vm-bootstrap/tasks/main.yml
+4
-12
playbook/roles/vm-bootstrap/tasks/upgrader.yml
playbook/roles/vm-bootstrap/tasks/upgrader.yml
+4
-6
No files found.
playbook/roles/ntp/tasks/main.yml
View file @
0e471d42
...
...
@@ -7,9 +7,9 @@
when
:
ansible_os_family == "RedHat"
-
name
:
ensure ntp is runing
service
:
name=ntp state=
running
enabled=yes
service
:
name=ntp state=
started
enabled=yes
when
:
ansible_os_family == "Debian"
-
name
:
ensure ntp is runing (RedHat)
service
:
name=ntpd state=
running
enabled=yes
service
:
name=ntpd state=
started
enabled=yes
when
:
ansible_os_family == "RedHat"
playbook/roles/vm-bootstrap/tasks/hostname.yml
View file @
0e471d42
...
...
@@ -36,8 +36,13 @@
lineinfile
:
dest=/etc/hosts line="{{ lookup('file', '/etc/opt/ipv4') }} {{ lookup('file', '/etc/opt/hostname') }}.tl.teralab-datascience.fr {{ lookup('file', '/etc/opt/hostname') }}"
when
:
hostname_file.stat.exists == True
-
name
:
setting cluster
shell
:
wget --no-check-certificate "{{ lookup('file', '/etc/opt/cluster.hash') }}/hosts" -O /tmp/hosts
-
name
:
setting cluster
uri
:
url
:
"
{{
lookup('file',
'/etc/opt/cluster.hash')
}}/hosts"
validate_certs
:
no
dest
:
/tmp/hosts
follow_redirects
:
safe
status_code
:
200,
304
when
:
cluster_hash.stat.exists == True
-
name
:
stat /tmp/hosts
...
...
playbook/roles/vm-bootstrap/tasks/main.yml
View file @
0e471d42
...
...
@@ -33,18 +33,10 @@
register
:
cluster_hash
-
name
:
get upgrade file if exists
shell
:
wget --no-check-certificate "{{ lookup('file', '/etc/opt/cluster.hash') }}/data" -O /etc/opt/upgrade.after
uri
:
url="{{ lookup('file', '/etc/opt/cluster.hash') }}/data" validate_certs=no status_code=200,304 return_content=yes
when
:
cluster_hash.stat.exists == True
ignore_errors
:
True
-
name
:
stat file upgrade.after
stat
:
path=/etc/opt/upgrade.after
register
:
upgrade_set
-
name
:
check if the plabook should be upgraded
shell
:
cat /etc/opt/upgrade.after
register
:
upgrade_time
when
:
upgrade_set.stat.exists == True
register
:
upgrade_needed
-
include
:
network.yml
-
include
:
hostname.yml
...
...
@@ -61,5 +53,5 @@
-
shell
:
echo 1 > /opt/upgrader/last-upgrade
when
:
last_upgrade.stat.exists == False
-
include
:
upgrader.yml upgrade_after={{ upgrade_
time.stdou
t }}
when
:
upgrade_
set.stat.exists == True and (upgrade_time.stdou
t|int > lookup('file', '/opt/upgrader/last-upgrade')|int)
-
include
:
upgrader.yml upgrade_after={{ upgrade_
needed.conten
t }}
when
:
upgrade_
needed.status in [200, 304] and (upgrade_needed.conten
t|int > lookup('file', '/opt/upgrader/last-upgrade')|int)
playbook/roles/vm-bootstrap/tasks/upgrader.yml
View file @
0e471d42
...
...
@@ -9,11 +9,11 @@
-
file
:
path=/opt/upgrader/ state=directory mode=0755
-
shell
:
rm -rf /opt/upgrader/playbook/
-
file
:
path=/opt/upgrader/playbook/ state=absent
-
shell
:
rm -rf /opt/upgrader/archive.tar.gz
-
file
:
path=/opt/upgrader/archive.tar.gz state=absent
-
shell
:
mkdir -p /opt/upgrader/playbook
-
file
:
path=/opt/upgrader/playbook state=directory mode=0755
-
name
:
Download the latest playbook
shell
:
slapcache-download --destination=/opt/upgrader/archive.tar.gz
...
...
@@ -30,10 +30,8 @@
when
:
current_upgrade_signature.stat.exists == False
-
name
:
Copy slapos.playbook
shell
:
tar -xzvf /opt/upgrader/archive.tar.gz
unarchive
:
src=/opt/upgrader/archive.tar.gz dest=/opt/slapos.playbook
when
:
(upgrade_after|int > lookup('file', '/opt/upgrader/last-upgrade')|int ) and (lookup('file', '/opt/upgrader/next-upgrade-signature') != lookup('file', '/opt/upgrader/current-upgrade-signature'))
args
:
chdir
:
/opt/slapos.playbook
-
name
:
Upgrade Current Upgrade Signature
shell
:
echo /opt/upgrader/next-upgrade-signature > /opt/upgrader/current-upgrade-signature && echo {{ ansible_date_time.epoch }} > /opt/upgrader/last-upgrade
...
...
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