Skip to content

Create server and export client in one step #271

@barrypitman

Description

@barrypitman

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.10.8
  • Ruby: 2.0.0p648
  • Distribution: Red Hat 7.4
  • Module version: 7.1.0

How to reproduce (e.g Puppet code you use)

# https://github.com/voxpupuli/puppet-openvpn
openvpn::servers:
    'server_name':
        country: 'ZA'
        province: 'GP'
        city: 'Pretoria'
        organization: 'google.com'
        email: '[email protected]'
        server: '10.200.200.0 255.255.255.0'

openvpn::client_defaults:
    server: 'server_name'

openvpn::clients:
    'client_name': {}

openvpn::deploy::export:
        client_name:
            server: 'server_name'

What are you seeing

I can't run the above on a new server. If I do, I get the following error:

Evaluation Error: Operator '[]' is not applicable to an Undef Value. at /etc/puppetlabs/code/environments/openvpn/modules/openvpn/manifests/deploy/export.pp:38:8

It seems that there is an error creating a new server and exporting a client in one step/run. If I comment out the export, and create the server and clients first, then uncomment the export, it works as expected.

What behaviour did you expect instead

I'd like to be able to create & export in one step

Output log

Any additional information you'd like to impart

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions