Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
4220c3cc
Commit
4220c3cc
authored
Sep 09, 2013
by
Adam Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added try/catch around .connected call
parent
50adda50
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
library/net_infrastructure/firewalld
+6
-2
No files found.
library/net_infrastructure/firewalld
View file @
4220c3cc
...
@@ -194,8 +194,12 @@ def main():
...
@@ -194,8 +194,12 @@ def main():
timeout
=
module
.
params
[
'timeout'
]
timeout
=
module
.
params
[
'timeout'
]
## Check for firewalld running
## Check for firewalld running
if
fw
.
connected
==
False
:
try
:
module
.
fail_json
(
msg
=
'firewalld service must be running'
)
if
fw
.
connected
==
False
:
module
.
fail_json
(
msg
=
'firewalld service must be running'
)
except
AttributeError
:
module
.
fail_json
(
msg
=
"firewalld connection can't be established,
\
version likely too old. Requires firewalld >= 2.0.11"
)
if
service
!=
None
and
port
!=
None
:
if
service
!=
None
and
port
!=
None
:
module
.
fail_json
(
msg
=
'can only operate on port or service at once'
)
module
.
fail_json
(
msg
=
'can only operate on port or service at once'
)
...
...
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