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
2f9b7c6d
Commit
2f9b7c6d
authored
Oct 10, 2018
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook: imt-slapos: enable firewalld configuration in slapos.cfg
parent
ab17e43f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
playbook/roles/imt-slapos/tasks/main.yml
playbook/roles/imt-slapos/tasks/main.yml
+21
-0
No files found.
playbook/roles/imt-slapos/tasks/main.yml
View file @
2f9b7c6d
...
...
@@ -46,6 +46,27 @@
-
{
regexp
:
'
^manager_list\s*='
,
line
:
'
manager_list
=
prerm'
}
when
:
post_config is defined and slapos_cfg.stat.exists == True
-
name
:
Check whether firewall is enabled
shell
:
grep -Fxq "[firewall]" /etc/opt/slapos/slapos.cfg
register
:
has_firewall
ignore_errors
:
yes
when
:
post_config is defined and slapos_cfg.stat.exists == True
-
name
:
activate firewalld in slapos config
lineinfile
:
dest=/etc/opt/slapos/slapos.cfg line="[firewall]\n" insertbefore="^\[networkcache\]"
when
:
post_config is defined and has_firewall.rc != 0 and slapos_cfg.stat.exists == True
-
name
:
Update firewall configuration
lineinfile
:
dest=/etc/opt/slapos/slapos.cfg regexp="{{ item.regexp }}" line="{{ item.line }}" insertafter="^\[firewall\]$" state=present
with_items
:
-
{
regexp
:
'
^dbus_executable\s*='
,
line
:
'
dbus_executable
=
/opt/slapos/parts/dbus/bin/dbus-daemon
--nofork
--nopidfile
--system'
}
-
{
regexp
:
'
^firewall_executable\s*='
,
line
:
'
firewall_executable
=
/opt/slapos/parts/firewalld/sbin/firewalld
--nofork'
}
-
{
regexp
:
'
^firewall_cmd\s*='
,
line
:
'
firewall_cmd
=
/opt/slapos/parts/firewalld/bin/firewall-cmd'
}
-
{
regexp
:
'
^log_file\s*=*firewalld*'
,
line
:
'
log_file
=
/opt/slapos/log/firewalld.log'
}
-
{
regexp
:
'
^dbus_log_file\s*='
,
line
:
'
dbus_log_file
=
/opt/slapos/log/dbus.log'
}
-
{
regexp
:
'
^reload_config_cmd\s*='
,
line
:
'
reload_config_cmd
=
slapos
node
restart
firewall'
}
when
:
post_config is defined and slapos_cfg.stat.exists == True
-
modprobe
:
name=kvm state=present
when
:
post_config is defined
-
modprobe
:
name=kvm_intel state=present
...
...
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