Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example of using openwrt_lineinfile #36

Open
TheLinuxGuy opened this issue Jun 21, 2021 · 1 comment
Open

Example of using openwrt_lineinfile #36

TheLinuxGuy opened this issue Jun 21, 2021 · 1 comment

Comments

@TheLinuxGuy
Copy link

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
Copy link
Contributor

- 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants