Code Monkey home page Code Monkey logo

ansible-firewalld-role's People

Contributors

flatkey avatar herd-the-cats avatar joonastikkanen avatar pavel-z1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ansible-firewalld-role's Issues

set firewalld default zone fails in check mode

In check mode, set firewalld default zone fails with this error:

The conditional check 'defaultzone.stdout != default_zone' failed. The error was: error while evaluating conditional (defaultzone.stdout != default_zone): 'dict object' has no attribute 'stdout'

because the tasks is skipped.

To prevent this, you should add check_mode: no into the task :

- name: get actual firewalld default zone
  command: /bin/firewall-cmd --get-default-zone
  register: defaultzone
  changed_when: false
  check_mode: no
  tags: firewalld

Thx

Typo in README.md

The example in README.md refers to "firewalld__zone_interface" but it should be "firewalld_zone_interface" (one underscore between firewall and zone).

Consitional check failed

I'm getting this conditional check error since recently:

The conditional check 'firewalld_purge_services and item not in firewalld_service_rules' failed. The error was: error while evaluating conditional (firewalld_purge_services and item not in firewalld_service_rules): 'firewalld_purge_services' is undefined\n\nThe error appears to have been in '/var/lib/awx/projects/_10__soe/roles/FlatKey.firewalld/tasks/main.yml': line 53, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: purge unconfigured firewalld service rules\n ^ here\n

I don't have the firewalld_purge_services variable defined, but thought it was optional

set firewalld default zone fails when default_zone not set

set firewalld default zone fails when default_zone not set because of the conditional:
when: defaultzone.stdout != default_zone

I suggest removing the conditional altogether, as well as task "get actual firewalld default zone", since removing these would produce the same effect:

  1. If default zone isn't 'public' it would be changed to public;
  2. If default zone is 'public', it won't do anything.

zone defaults to public, instead of default_zone

Most tasks where a zone is required default to 'public'.
I suggest they should default to 'default_zone' and then to public, which can be achieved by doing this:
zone: "{{ item.value.zone|default(default_zone|default('public')) }}"

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.