Comments (4)
@smiller171 the reset include already has the ufw-reset
tag
Generally: I added the reset to make it easier to manage the rules but since this seems to be unwanted in some cases I added the ufw_reset
option. It's yes
by default but you can set it to no
. You'll then have to make sure you remove rules by yourself by setting a rule's delete
flag.
from ansible-ufw.
Hi Perry,
must admit, haven't had this scenario yet but let's try to figure that out :)
Your right, setting the hash_behaviour
is a absolute no go except for really small setups where you know nothing unexpected is gonna happen. The alternative is to use it within jinja templates for hashes or in this case arrays:
...
ufw_rules_foo:
- { from_ip: '127.0.0.1/8' }
- { from_ip: '127.0.42.0/24', rule: deny }
ufw_rules_bar:
- { port: 80, rule: allow }
ufw_rules: "{{ ufw_rules_foo + ufw_rules_bar}}"
...
One option would be to use multiple playbooks and run the role only for a specific tag:
- hosts: all
roles:
- {role: franklinkim.ufw, tags: ['ufw-reset']}
...
- hosts: db
roles:
- {role: franklinkim.ufw, tags: ['ufw-config']}
...
from ansible-ufw.
idempotence test fails
TASK [franklinkim.ufw : Resetting firewall] ************************************
changed: [localhost]
Could the firewall only be reset if the rule(s) change(s)?
from ansible-ufw.
While I think it should be idempotent, for the context of this specific issue could you tag the reset include and allow a user to run with --skip-tags reset
?
from ansible-ufw.
Related Issues (15)
- Port Range HOT 2
- UFW applications don't allow for whitelisting IPs HOT 1
- Idempotence issues HOT 2
- Idempotence issue when explicitly setting a protocol HOT 1
- Use ansible_port if defined. If not, fallback to port 22 HOT 2
- Rule sequence HOT 1
- suggestion HOT 1
- [BUG] Allow all traffic to any port from anywhere enabled by default HOT 8
- ERROR! couldn't resolve module/action 'community.general.ufw' HOT 10
- Push 1.5 to ansible galaxy HOT 2
- allow port 22 by default HOT 1
- 1.5.2 not available on galaxy HOT 1
- ensure that code only runs on ubuntu systems
- test that checks whether port is really open HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-ufw.