Example of using openwrt_lineinfile
TheLinuxGuy opened this issue · 1 comments
TheLinuxGuy commented
Hi,
Would you have an example for replacing ansible.builtin lineinfile with your package?
Consider the below
- name: Ensure auth creds are in config
ansible.builtin.lineinfile:
path: 'surfshark_udp.ovpn'
regexp: '^auth-user-pass'
line: auth-user-pass /etc/openvpn/surfshark_udp.auth
Does it require "command: {{ openwrt_lineinfile }}" ? what is the pattern expected
baldurmen commented
- hosts: foobar2000
roles:
- gekmihesg.openwrt
tasks:
- name: test lineinfile
lineinfile:
path: '/tmp/surfshark_udp.ovpn'
regexp: '^auth-user-pass'
line: auth-user-pass /etc/openvpn/surfshark_udp.auth
This works fine on my test VM.