Add nat configuration service unit
This commit is contained in:
parent
c867d567e2
commit
1031d8311d
@ -45,3 +45,18 @@
|
||||
src: ham-hotspot-nat.nft.j2
|
||||
mode: "0644"
|
||||
notify: Restart nftables
|
||||
|
||||
# Install ham-hotspot-nat.service
|
||||
- name: Install ham-hotspot-nat.service
|
||||
ansible.builtin.template:
|
||||
dest: /etc/systemd/system/ham-hotspot-nat.service
|
||||
src: ham-hotspot-nat.service.j2
|
||||
mode: "0644"
|
||||
notify: Reload systemd
|
||||
|
||||
# Enable and start ham-hotspot-nat.service
|
||||
- name: Enable and start ham-hotspot-nat.service
|
||||
ansible.builtin.systemd:
|
||||
name: ham-hotspot-nat.service
|
||||
enabled: true
|
||||
state: started
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Ham Hotspot NAT Configuration
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/sbin/nft -f /etc/nftables.d/10-ham-hotspot-nat.nft
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Loading…
Reference in New Issue
Block a user