firewalld rich rule?

204 views
Skip to first unread message

Dylan Baars

unread,
May 1, 2016, 10:55:58 PM5/1/16
to Salt-users
Hi all,

I am trying to write a sls for a firewalld rich rule. I've found this example: http://www.alexlinux.com/saltstack-firewalld-formula-rich-rules-example/

But cutting it down to what I want:

-----------------
firewalld:
  zones:
    public:
      rich_rules:
        - family: ipv4
          source:
            address: 10.1.1.28/24
            port: 5432
            protocol: tcp  
          accept: true
-----------------

when I run it against a host I get this error:

[root@wellkatellodev salt]# salt 'testvmdb2.niwa.local' state.apply test
testvmdb2.niwa.local:
    Data failed to compile:
----------
    State 'firewalld' in SLS 'test' is not formed as a list
ERROR: Minions returned with non-zero exit code
[root@wellkatellodev salt]# 

Can anyone suggest what I'm doing wrong?

Thanks :-)
Dylan

Mike

unread,
May 2, 2016, 10:16:55 AM5/2/16
to Salt-users
Is that snippet you posted from a pillar or is that the test.sls file you're trying to run?

Checkout the firewalld state documentation here:

Reply all
Reply to author
Forward
0 new messages