Giter Club home page Giter Club logo

Comments (4)

franklinkim avatar franklinkim commented on July 25, 2024 1

@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.

franklinkim avatar franklinkim commented on July 25, 2024

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.

030 avatar 030 commented on July 25, 2024

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.

smiller171 avatar smiller171 commented on July 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.