Starting an rc file to set up netgraph.
This commit is contained in:
@@ -90,3 +90,38 @@
|
||||
state: absent
|
||||
when: jail_list|community.general.json_query('[?enabled==`true`]')|length == 0
|
||||
|
||||
- name: Install rc script
|
||||
when: netgraph_config is defined
|
||||
copy:
|
||||
src: "files/{{ item.src }}"
|
||||
dest: "/usr/local/etc/rc.d/{{ item.dest|default(item.src) }}"
|
||||
owner: root
|
||||
group: wheel
|
||||
mode: 0755
|
||||
loop:
|
||||
- src: setup_netgraph
|
||||
|
||||
- name: Install scripts
|
||||
when: netgraph_config is defined
|
||||
copy:
|
||||
src: "files/{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: wheel
|
||||
loop:
|
||||
- src: "{{ netgraph_config }}"
|
||||
dest: /usr/local/bin/setup_netgraph
|
||||
|
||||
- name: Enable setup_netgraph
|
||||
when: netgraph_config is defined
|
||||
community.general.sysrc:
|
||||
name: setup_netgraph_enable
|
||||
value: "YES"
|
||||
path: /etc/rc.conf.d/setup_netgraph
|
||||
|
||||
- name: Disable setup_netgraph
|
||||
when: netgraph_config is not defined
|
||||
file:
|
||||
path: /etc/rc.conf.d/setup_netgraph
|
||||
state: absent
|
||||
|
||||
Reference in New Issue
Block a user