Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TALK] Why you did'nt use the states firewalld ? #38

Open
ArthurREGNARD opened this issue Feb 14, 2020 · 4 comments
Open

[TALK] Why you did'nt use the states firewalld ? #38

ArthurREGNARD opened this issue Feb 14, 2020 · 4 comments
Labels

Comments

@ArthurREGNARD
Copy link

I would like to know why you did'nt use the firewalld Modules and States?

For exemple your doing in the init.sls file:

reload_firewalld:
  cmd.wait:
    - name: 'firewall-cmd --reload'
    - require:
      - service: service_firewalld

But the Modules do the same things:

reload_firewalld:
  modules.wait:
    - name: firewalld.reload_rules
    - require:
      - service: service_firewalld

Why you don't use the states firewalld.present ? This states reload firewalld if something changed.

@myii
Copy link
Member

myii commented Feb 14, 2020

@ArthurREGNARD Thanks for raising this issue. If you look at the blame, you can see that this section was added to the formula almost 3 years ago:

However, if you're willing to provide a PR, we can test if it does the job. We have Kitchen, Travis and InSpec set up for this formula, so I'm sure we can confirm things are working as necessary.


Linking to the state that you've mentioned:

@amendlik
Copy link

Looking at the dates, the systemd.reload_rules was not present until v2016.11 (released in November 2016), and this change to the systemd formula was made in March 2017. I probably just didn't have the very latest version of Salt when I created PR #10.

Moving to the module execution, rather than the command, seems like a good move to me.

@myii
Copy link
Member

myii commented Feb 14, 2020

@amendlik Thanks for the feedback, that's appreciated.

@aboe76
Copy link
Member

aboe76 commented Feb 14, 2020

@ArthurREGNARD you are correct with the reload module

The saltstack firewalld states are a bit different.
Sometimes they are a bit behind the curve, and provide fewer options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants