GithubHelp home page GithubHelp logo

Comments (7)

splendido avatar splendido commented on July 22, 2024

I also had no zip files created but then got it working.

The task "openvpn pack clients" relies on the openvpn_clients list.
In case your're using PAM as I do, you have to fill both the list of clients and pam users:

vars:
    openvpn_unified_client_profiles: no # default value
    openvpn_clients: [client_1, client_2, client_3]
    openvpn_use_pam: yes
    openvpn_use_pam_users:
    - { name: client_1, pwd: 'xxxxxx'}
    - { name: client_2, pwd: 'yyyyyy'}
    - { name: client_3, pwd: 'zzzzzz'}

from stouts.openvpn.

nkakouros avatar nkakouros commented on July 22, 2024

@apiening Did @splendido's suggestion solve it for you?

from stouts.openvpn.

apiening avatar apiening commented on July 22, 2024

I don't use PAM, so @splendido's suggestion does not apply in my case.
But I have openvpn_clients: of course.
The problem still persists for me, but as a workaround I copied over the task which packs the client archives into my playbook like this:

- name: openvpn pack clients
    command: zip -j {{item.item}}.zip {{item.item}}.crt {{item.item}}.key {{item.item}}.ovpn ca.crt {{openvpn_tls_key if openvpn_tls_auth else ''}}
    when: item.changed
    with_items: "{{openvpn_clients_changed.results}}"
    args:
      chdir: "{{ openvpn_keydir }}"

I still don't understand why it is not triggered in the first place.

from stouts.openvpn.

nkakouros avatar nkakouros commented on July 22, 2024

The task has become:

- name: Pack clients
  command: >-
    zip -j
      {{ item.item }}.zip
      {{ item.item }}.crt
      {{ item.item }}.key
      {{ item.item }}.ovpn
      ca.crt
      {{ openvpn_tls_key if openvpn_tls_auth else '' }}
  loop: "{{ openvpn_clients_changed.results }}"
  args:
    chdir: "{{ openvpn_keydir }}"
    creates: "{{ item.item }}.zip"

There is no condition, only that the clients are newly created. Have you updated the role recently?

from stouts.openvpn.

apiening avatar apiening commented on July 22, 2024

I've installed the role with ansible-galaxy install stouts.openvpn and I tried that again but I get the message [WARNING]: - stouts.openvpn (2.4.0) is already installed - use --force to change version to unspecified.
It looks like the git version is newer (2.4.1) so I tried a ansible-galaxy install git+https://github.com/Stouts/Stouts.openvpn.git which results in the same warning message.
Should I just use the --force option to update the role or is a manual git checkout required to update the role to the latest sources?

from stouts.openvpn.

nkakouros avatar nkakouros commented on July 22, 2024

Try ansible-galaxy install git+https://github.com/Stouts/Stouts.openvpn.git,develop. There are many changes that have not been tagged in a new version yet.

from stouts.openvpn.

apiening avatar apiening commented on July 22, 2024

With the latest version from git,develop it does work for me.
I had to adapt my playbook because EasyRSA is not handled by this role anymore.
However I have the issue that the ta.key is not included in the zip-files.
But that's another issue.
Closing this one.

from stouts.openvpn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.