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
Rafael Monnerat
slapos.package
Commits
13376234
Commit
13376234
authored
Mar 16, 2023
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Plain Diff
playbook: make it possible to run playbook when apt repository is broken
See merge request
!179
parents
e9b7d5f8
f54f72cf
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
13 deletions
+22
-13
playbook/roles/etckeeper/tasks/main.yml
playbook/roles/etckeeper/tasks/main.yml
+2
-2
playbook/roles/package/tasks/main.yml
playbook/roles/package/tasks/main.yml
+13
-2
playbook/roles/repository/tasks/debian_init.yml
playbook/roles/repository/tasks/debian_init.yml
+1
-0
playbook/roles/slapos-proxy/meta/main.yml
playbook/roles/slapos-proxy/meta/main.yml
+1
-0
playbook/roles/slapos-proxy/tasks/main.yml
playbook/roles/slapos-proxy/tasks/main.yml
+2
-6
playbook/roles/standalone-shared/tasks/debian9-gcc-4.9.yml
playbook/roles/standalone-shared/tasks/debian9-gcc-4.9.yml
+3
-3
No files found.
playbook/roles/etckeeper/tasks/main.yml
View file @
13376234
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
register
:
gitignore_file
register
:
gitignore_file
-
name
:
Install git
-
name
:
Install git
apt
:
name=git state=latest
update_cache=no
apt
:
name=git state=latest
when
:
ansible_os_family == "Debian"
when
:
ansible_os_family == "Debian"
-
name
:
Install git
-
name
:
Install git
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
when
:
ansible_os_family == "RedHat"
when
:
ansible_os_family == "RedHat"
-
name
:
Install etckeeper
-
name
:
Install etckeeper
apt
:
name=etckeeper state=latest
update_cache=no
apt
:
name=etckeeper state=latest
when
:
ansible_os_family == "Debian"
when
:
ansible_os_family == "Debian"
-
name
:
Install etckeeper
-
name
:
Install etckeeper
...
...
playbook/roles/package/tasks/main.yml
View file @
13376234
-
name
:
Install {{ package_name }} using apt
-
name
:
Try to update apt cache
apt
:
name={{ package_name }} state={{ package_state }}
update_cache=yes cache_valid_time=3600
apt
:
update_cache=yes cache_valid_time=3600
when
:
ansible_os_family == "Debian" or ansible_os_family == "Linuxmint" or ansible_os_family == "Kylin"
when
:
ansible_os_family == "Debian" or ansible_os_family == "Linuxmint" or ansible_os_family == "Kylin"
ignore_errors
:
true
-
name
:
Install {{ package_name }} (latest) using apt
# We use update_cache=yes without ignoring errors (Unlike the "Try to update apt cache" task above),
# because if `latest` package is requested it is an error if we can not update the cache.
apt
:
name={{ package_name }} state={{ package_state }} update_cache=yes cache_valid_time=3600
when
:
package_state == "latest" and ansible_os_family == "Debian" or ansible_os_family == "Linuxmint" or ansible_os_family == "Kylin"
-
name
:
Install {{ package_name }} using apt
apt
:
name={{ package_name }} state={{ package_state }}
when
:
package_state != "latest" and ansible_os_family == "Debian" or ansible_os_family == "Linuxmint" or ansible_os_family == "Kylin"
-
name
:
Install {{ package_name }} using yum
-
name
:
Install {{ package_name }} using yum
yum
:
name={{ package_name }} state={{ package_state }} update_cache=yes
yum
:
name={{ package_name }} state={{ package_state }} update_cache=yes
...
...
playbook/roles/repository/tasks/debian_init.yml
View file @
13376234
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
command
:
apt-get update -y --allow-releaseinfo-change
command
:
apt-get update -y --allow-releaseinfo-change
when
:
(ansible_distribution == "Debian" and ansible_distribution_major_version|int > 9) or
when
:
(ansible_distribution == "Debian" and ansible_distribution_major_version|int > 9) or
(ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int > 18)
(ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int > 18)
ignore_errors
:
true
-
name
:
Install gpg using apt
-
name
:
Install gpg using apt
apt
:
name=gpg state=present
apt
:
name=gpg state=present
...
...
playbook/roles/slapos-proxy/meta/main.yml
View file @
13376234
---
---
dependencies
:
dependencies
:
-
{
role
:
repository
,
when
:
not slapos_ansible_offline
}
-
{
role
:
repository
,
when
:
not slapos_ansible_offline
}
-
{
role
:
package
,
package_name
:
slapos-node
,
package_state
:
present
,
when
:
ansible_distribution != "CentOS"
}
playbook/roles/slapos-proxy/tasks/main.yml
View file @
13376234
...
@@ -10,15 +10,11 @@
...
@@ -10,15 +10,11 @@
state
:
directory
state
:
directory
mode
:
0755
mode
:
0755
-
name
:
Install packages using apt
apt
:
name=slapos-node state=present update_cache=yes cache_valid_time=3600
when
:
ansible_os_family == "Debian" and not slapos_ansible_offline
-
name
:
Uninstall firewalld on CentOS
-
name
:
Uninstall firewalld on CentOS
yum
:
name=firewalld state=absent update_cache=yes
yum
:
name=firewalld state=absent update_cache=yes
when
:
ansible_distribution == "CentOS"
when
:
ansible_distribution == "CentOS"
-
name
:
Install
re6stnet
on CentOS
-
name
:
Install
slapos-node
on CentOS
yum
:
name=slapos.node state=present update_cache=yes
yum
:
name=slapos.node state=present update_cache=yes
when
:
ansible_distribution == "CentOS" and ansible_distribution_major_version != "7" and not slapos_ansible_offline
when
:
ansible_distribution == "CentOS" and ansible_distribution_major_version != "7" and not slapos_ansible_offline
...
@@ -29,7 +25,7 @@
...
@@ -29,7 +25,7 @@
checksum
:
"
md5:37446cc16b38fa5769f3e084294c8683"
checksum
:
"
md5:37446cc16b38fa5769f3e084294c8683"
when
:
ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" and not slapos_ansible_offline
when
:
ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" and not slapos_ansible_offline
-
name
:
Install
re6stnet
on CentOS
7
-
name
:
Install
slapos-node
on CentOS
7
yum
:
name=/tmp/slapos.node-1.0.56-2.1.x86_64.rpm state=present update_cache=yes
yum
:
name=/tmp/slapos.node-1.0.56-2.1.x86_64.rpm state=present update_cache=yes
when
:
ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" and not slapos_ansible_offline
when
:
ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" and not slapos_ansible_offline
...
...
playbook/roles/standalone-shared/tasks/debian9-gcc-4.9.yml
View file @
13376234
---
---
-
name
:
Install Debian Jessie repository for Debian 9 for gcc-4.9
-
name
:
Install Debian Jessie repository for Debian 9 for gcc-4.9
apt_repository
:
repo='deb http://ftp.us.debian.org/debian/ jessie main contrib non-free' state=present
update_cache=no
apt_repository
:
repo='deb http://ftp.us.debian.org/debian/ jessie main contrib non-free' state=present
when
:
ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
when
:
ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
-
name
:
Update repos for debian
9
-
name
:
Update repos for debian
9
...
@@ -8,11 +8,11 @@
...
@@ -8,11 +8,11 @@
when
:
ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
when
:
ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
-
name
:
Install gcc-4.9 on Debian
9
-
name
:
Install gcc-4.9 on Debian
9
apt
:
name=gcc-4.9 state=present
update_cache=yes cache_valid_time=3600
apt
:
name=gcc-4.9 state=present
when
:
ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
when
:
ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
-
name
:
Install g++-4.9 on Debian
9
-
name
:
Install g++-4.9 on Debian
9
apt
:
name=g++-4.9 state=present
update_cache=yes cache_valid_time=3600
apt
:
name=g++-4.9 state=present
when
:
ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
when
:
ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
-
name
:
Default to cpp-4.9
-
name
:
Default to cpp-4.9
...
...
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