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
Guillaume Hervier
slapos.package
Commits
7967a7c3
Commit
7967a7c3
authored
Jan 30, 2019
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CLEANUP: cleanup a bit the playbook and let it work with --check option
parent
50da7401
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
9 deletions
+11
-9
playbook/roles/package/tasks/main.yml
playbook/roles/package/tasks/main.yml
+2
-2
playbook/roles/re6stnet/tasks/main.yml
playbook/roles/re6stnet/tasks/main.yml
+2
-2
playbook/roles/slapos/tasks/main.yml
playbook/roles/slapos/tasks/main.yml
+2
-2
playbook/roles/upgrader/tasks/main.yml
playbook/roles/upgrader/tasks/main.yml
+4
-3
playbook/roles/vifib-server/tasks/main.yml
playbook/roles/vifib-server/tasks/main.yml
+1
-0
No files found.
playbook/roles/package/tasks/main.yml
View file @
7967a7c3
-
name
:
Install
packages
using apt
-
name
:
Install
{{ package_name }}
using apt
apt
:
name={{ package_name }} state={{ package_state }} update_cache=yes cache_valid_time=3600
when
:
ansible_os_family == "Debian" or ansible_os_family == "Linuxmint"
-
name
:
Install
re6stnet on CentOS
-
name
:
Install
{{ package_name }} using yum
yum
:
name={{ package_name }} state={{ package_state }} update_cache=yes
when
:
ansible_os_family == "RedHat"
playbook/roles/re6stnet/tasks/main.yml
View file @
7967a7c3
---
-
name
:
Check if configuration
exists already
-
name
:
Check if configuration
already exists
stat
:
path=/etc/re6stnet/re6stnet.conf
register
:
re6stnet_conf
...
...
@@ -25,7 +25,7 @@
shell
:
"
re6st-conf
--registry
{{
re6st_registry_url
}}
--token
{{
re6sttoken
}}
-r
title
{{
re6sttoken
}}
-d
/etc/re6stnet"
when
:
re6st_annon == False and re6stnet_conf.stat.exists == False and "{{ re6sttoken }}" != "notoken" and "{{ re6st_fingerprint }}" == "nofingerprint"
-
name
:
Check if configuration exists already
-
name
:
Recheck if configuration already exists (after running re6st-conf)
stat
:
path=/etc/re6stnet/re6stnet.conf
register
:
recheck_re6stnet_conf
...
...
playbook/roles/slapos/tasks/main.yml
View file @
7967a7c3
-
name
:
Install
packages
using apt
-
name
:
Install
slapos.node
using apt
apt
:
name=slapos-node state={{ package_state }} update_cache=yes cache_valid_time=3600
when
:
ansible_os_family == "Debian"
-
name
:
Install
re6stnet on CentOS
-
name
:
Install
slapos.node using yum
yum
:
name=slapos.node state={{ package_state }} update_cache=yes
when
:
ansible_os_family == "RedHat"
...
...
playbook/roles/upgrader/tasks/main.yml
View file @
7967a7c3
...
...
@@ -43,6 +43,7 @@
-
name
:
Update playbook md5
shell
:
echo {{ archive.stat.md5 }} > /opt/upgrader/next-upgrade-signature
when
:
not ansible_check_mode
-
name
:
Stat Current Upgrade Signature
file
:
path=/opt/upgrader/current-upgrade-signature state=touch mode="0666"
...
...
@@ -59,7 +60,7 @@
-
name
:
Do upgrade
shell
:
ansible-playbook {{ upgrader_playbook }} -i hosts 2>>/opt/upgrader/latest_upgrade.log >> /opt/upgrader/latest_upgrade.log
when
:
(upgrade_after > lookup('file', '/opt/upgrader/last-upgrade')|int ) and (lookup('file', '/opt/upgrader/next-upgrade-signature') != lookup('file', '/opt/upgrader/current-upgrade-signature'))
when
:
not ansible_check_mode and
(upgrade_after > 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/upgrader/playbook-tmp/
...
...
@@ -72,9 +73,9 @@
-
name
:
Upgrade Current Upgrade Signature
shell
:
cat /opt/upgrader/next-upgrade-signature > /opt/upgrader/current-upgrade-signature
when
:
(upgrade_after > lookup('file', '/opt/upgrader/last-upgrade')|int ) and (lookup('file', '/opt/upgrader/next-upgrade-signature') != lookup('file', '/opt/upgrader/current-upgrade-signature'))
when
:
not ansible_check_mode and
(upgrade_after > lookup('file', '/opt/upgrader/last-upgrade')|int ) and (lookup('file', '/opt/upgrader/next-upgrade-signature') != lookup('file', '/opt/upgrader/current-upgrade-signature'))
-
shell
:
echo {{ ansible_date_time.epoch }} > /opt/upgrader/last-upgrade
when
:
(upgrade_after > lookup('file', '/opt/upgrader/last-upgrade')|int )
when
:
not ansible_check_mode and
(upgrade_after > lookup('file', '/opt/upgrader/last-upgrade')|int )
-
include
:
remove-legacy.yml
playbook/roles/vifib-server/tasks/main.yml
View file @
7967a7c3
...
...
@@ -48,6 +48,7 @@
-
name
:
Get systemd version
shell
:
systemd --version | head -n 1 | cut -d " " -f
2
register
:
systemd_version
check_mode
:
no
-
file
:
state=directory path="/etc/systemd/system/cron.service.d/"
when
:
systemd_version.stdout | int >
228
...
...
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