Hello,

- name: "Loading pf.conf"
  template: src=pf.conf dest=/etc/ validate="pfctl -f %s"

Works fine for me.
Configuration is copied and loaded if correct, otherwise the rule file is not 
modified and not loaded (and the playbook fails with error).

--
Cordialement,
Pierre BARDOU

-----Message d'origine-----
De : [email protected] [mailto:[email protected]] De la part de 
Antoine Jacoutot
Envoyé : lundi 21 novembre 2016 23:48
À : sven falempin <[email protected]>
Cc : [email protected]
Objet : Re: reloading pf through ansible easy hook

On Mon, Nov 21, 2016 at 05:34:35PM -0500, sven falempin wrote:
> Ansible is already managing pkg and service of openBSD , cool
> 
> If one want to manage pf with it, and push or modify a few files, on 
> must run - command: /sbin/pfctl -f {{ dank.config }}
> 
> Yet - service could be use, if this glue was in the rc.d directory :

You can easily create an ansible role|module to do that natively.
The rc.d framework is only meant to handle real daemons.
We don't want it to manage pf, quota, network, mounts...

--
Antoine

Reply via email to