Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
K3S Ansible
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Дмитрий Сафронов
K3S Ansible
Commits
6534ecaa
Commit
6534ecaa
authored
4 years ago
by
David Putzolu
Browse files
Options
Downloads
Patches
Plain Diff
Fix to make work on Raspbian64
parent
2617620d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/raspbian/tasks/main.yml
+19
-22
19 additions, 22 deletions
roles/raspbian/tasks/main.yml
with
19 additions
and
22 deletions
roles/raspbian/tasks/main.yml
+
19
−
22
View file @
6534ecaa
---
-
name
:
Test for Raspbian
stat
:
path
:
/boot/cmdline.txt
register
:
cmdline
set_fact
:
raspbian
:
'
{%
if
(
ansible_facts.architecture
is
search("arm")
and
ansible_facts.lsb.description
is
match("[Rr]aspbian.*[Bb]uster")
)
or
(
ansible_facts.architecture
is
search("aarch64")
and
ansible_facts.lsb.description
is
match("Debian.*buster")
)
%}true{%
else
%}false{%
endif
%}'
-
name
:
Activating cgroup
on Raspbian
-
name
:
Activating cgroup
support
lineinfile
:
path
:
/boot/cmdline.txt
regexp
:
'
^(
.*rootwait
)$'
regexp
:
'
^(
(?!.*\bcgroup_enable=cpuset
cgroup_memory=1
cgroup_enable=memory\b).*
)$'
line
:
'
\1
cgroup_enable=cpuset
cgroup_memory=1
cgroup_enable=memory'
backrefs
:
true
when
:
-
cmdline.stat.path is defined
-
ansible_facts.architecture is search("arm")
register
:
boot_cmdline
-
raspbian is
true
-
name
:
Flush iptables before changing iptables-legacy
-
name
:
Flush iptables before changing
to
iptables-legacy
iptables
:
flush
:
true
when
:
-
ansible_facts.lsb.description is match("[Rr]aspbian.*[Bb]uster")
-
raspbian is
true
-
name
:
Changing to iptables-legacy
for Raspbian Buster
-
name
:
Changing to iptables-legacy
alternatives
:
path
:
/usr/sbin/iptables-legacy
name
:
iptables
register
:
ip
6
_legacy
register
:
ip
4
_legacy
when
:
-
ansible_facts.lsb.description is match("[Rr]aspbian.*[Bb]uster")
-
raspbian is
true
-
name
:
Changing to ip6tables-legacy
for Raspbian Buster
-
name
:
Changing to ip6tables-legacy
alternatives
:
path
:
/usr/sbin/ip6tables-legacy
name
:
ip6tables
register
:
ip
4
_legacy
register
:
ip
6
_legacy
when
:
-
ansible_facts.lsb.description is match("[Rr]aspbian.*[Bb]uster")
-
raspbian is
true
-
name
:
Rebooting
on Raspbian
-
name
:
Rebooting
reboot
:
when
:
-
boot_cmdline is changed
-
ansible_facts.architecture is search("arm")
-
ip6_legacy is changed
-
ip4_legacy is changed
-
raspbian is
true
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment