Ask Your Question

How to install Openvpn multiple server instances under systemd?

asked 2017-11-21 03:29:47 -0600

markhorrocks gravatar image

updated 2017-11-22 08:22:34 -0600

I have an Ubuntu 16.04 server and want to install multiple server configs for OpenVPN. Does anyone have any pointers for writing a manifest or links to resources? I don't want to use a Puppetforge plugin.

I need to be able to do something like this for 3 ro 4 config files running under a single instance.

systemctl start openvpn@server2.service

systemctl start openvpn@server.service


systemctl enable openvpn@server2.service

systemctl enable openvpn@server.service

edit retag flag offensive close merge delete


The @so_and_so part of your systemd unit specifies different instances. In your case there are three or four instances not just quote-unquote “under a single instance” See and #Description .

Kai Burghardt gravatar imageKai Burghardt ( 2017-11-22 10:32:17 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2017-11-22 10:29:19 -0600

Regarding your systemctl(1) calls, you can use the service resource type:

service { ['openvpn@server0', 'openvpn@server1']:
  ensure => running,
  enable => true,
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-11-21 03:29:47 -0600

Seen: 221 times

Last updated: Nov 22 '17