Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

Commit e038b24

Browse files
committed
Merging 2.x.
2 parents 5518f67 + 1faf72c commit e038b24

File tree

22 files changed

+391
-63
lines changed

22 files changed

+391
-63
lines changed

docs/_Sidebar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
- [MySQL Server - Oracle Community Edition](/roles/debian/mysql_server_oracle_ce)
6161
- [NGINX](/roles/debian/nginx)
6262
- [NodeJS](/roles/debian/nodejs)
63-
- [OpenVPN Config](/roles/debian/openvpn_config)
63+
- [OpenVPN](/roles/debian/openvpn)
6464
- [OSSEC](/roles/debian/ossec)
6565
- [Packer](/roles/debian/packer)
6666
- [PHP Composer](/roles/debian/php_composer)

docs/roles/debian/nginx.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ nginx:
6969
# reload_command: restart
7070
# reload:
7171
# - nginx
72+
# on_calendar: "Mon *-*-* 04:00:00"
7273
ratelimitingcrawlers: true
7374
is_default: true
7475
basic_auth:

docs/roles/debian/openvpn.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# OpenVPN
2+
This role installs [the `openvpn-install.sh`` bash script from GitHub](https://github.com/angristan/openvpn-install) and optionally runs it in headless mode.
3+
4+
## PAM authentication
5+
There are two options here, one is simple PAM authentication against Linux users, the other is PAM authentication with LDAP. If you want to provide a custom PAM configuration you should set `openvpn.pam.enabled` to `true` and create your own template to override the `openvpn.pam.j2` template provided. This file is placed in `/etc/pam.d/openvpn` and loaded by the OpenVPN authentication module to perform authorisation checks.
6+
7+
The LDAP integration ships with a default configuration for PAM which, as above, can be overridden. It assumes the use of [our `pam_ldap` role](https://github.com/codeenigma/ce-provision/tree/2.x/roles/debian/pam_ldap) for the LDAP variables and defaults to those values, but they can be set explicitly if required.
8+
9+
## Hardcoded values
10+
At the moment we do not support headless customisation of encryption settings. This seems possible [by setting the right variables](https://github.com/angristan/openvpn-install/blob/master/openvpn-install.sh#L392-L401) and we'll add it later if we can. The defaults are sane, but please note the default cipher is `AES-128-GCM`. We have allowed for finding and replacing this value as part of our role.
11+
12+
[The client config directory is set to `/etc/openvpn/ccd`.](https://github.com/angristan/openvpn-install/blob/master/openvpn-install.sh#L900C19-L900C35)
13+
14+
<!--ROLEVARS-->
15+
## Default variables
16+
```yaml
17+
---
18+
openvpn:
19+
script_install_path: "/home/{{ user_provision.username }}"
20+
auto_install: true
21+
name: vpn.example.com
22+
ipv4_settings: "" # defaults to `10.8.0.0 255.255.255.0` - example, to use 192.168.140.0/24 set "192.168.140.0 255.255.255.0"
23+
cipher: "" # defaults to AES-128-GCM, see https://github.com/angristan/openvpn-install/blob/master/openvpn-install.sh#L404-L410
24+
allow_floating_client_ip: true # allow for ISP address change with DHCP (option float)
25+
multiple_connections: false # set to true to enable multiple VPN connections (option duplicate-cn)
26+
approve_ip: "y"
27+
ipv6_support: "n"
28+
port_choice: "1" # 1 = use default 1194, 3 means use a random port
29+
protocol_choice: "1" # 1 = udp, 2 = tcp
30+
dns: "1" # 1 = system default, see options - https://github.com/angristan/openvpn-install/blob/master/openvpn-install.sh#L314-L327
31+
compression_enabled: "n"
32+
compression_choice: "1" # only works if compression_enabled is "y", 1 = LZ4-v2, 2 = LZ4, 3 = LZ0
33+
customize_enc: "n"
34+
pass: "1"
35+
#nat_endpoint: "$(curl -4 ifconfig.co)" # for servers behind NAT, see https://github.com/angristan/openvpn-install?tab=readme-ov-file#headless-install
36+
push_routes_ipv4: [] # list of VPN push routes for ipv4 networks
37+
# Examples:
38+
# - "192.168.1.0 255.255.255.0" # push range 192.168.1.0/24, format = "IP-address/range netmask"
39+
# - "1.2.3.4 255.255.255.255" # push specific IP 1.2.3.4
40+
# - www.google-analytics.com # push any IP resolving to www.google-analytics.com
41+
push_routes_ipv6: [] # list of VPN push routes for ipv6 networks - ipv6_support must be "y"
42+
pam:
43+
enabled: false # relies on `openvpn-plugin-auth-pam.so` which is bundled with OpenVPN server for Debian
44+
module_path: /usr/lib/x86_64-linux-gnu/openvpn/plugins/openvpn-plugin-auth-pam.so # use `dpkg -L openvpn | grep '\bpam\b'` to discover the path
45+
config_template: openvpn.pam.j2 # allow override of PAM config template
46+
ldap:
47+
enabled: false # if true we assume the pam_ldap role is also being used on this server
48+
config_template: openvpn.pam.ldap.j2 # allow override of PAM config template for LDAP
49+
endpoints: "{{ pam_ldap.endpoints | default('[]') }}"
50+
lookup_base: "{{ pam_ldap.lookup_base | default('') }}"
51+
lookup_filter: "|(objectClass=inetOrgPerson)" # LDAP filter to apply to lookups
52+
login_attribute: uid # the LDAP attribute to check the OpenVPN username against
53+
group_base: "" # e.g. ou=Groups,dc=example,dc=com
54+
group_dn: "" # restrict to specific group, e.g. cn=admins,ou=Groups,dc=example,dc=com
55+
group_attribute: memberUid # the LDAP group attribute to check the OpenVPN username against
56+
ssl_certificate: "{{ pam_ldap.ssl_certificate | default('') }}"
57+
ssl_certificate_check: "{{ pam_ldap.ssl_certificate_check | default(true) }}"
58+
59+
```
60+
61+
<!--ENDROLEVARS-->

roles/aws/aws_iam_saml/templates/access_billing_policy.j2

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"freetier:*",
1010
"ce:*",
1111
"cur:*",
12-
"tax:*"
12+
"tax:*",
13+
"sustainability:*"
1314
],
1415
"Effect": "Allow",
1516
"Resource": "*"
@@ -27,7 +28,7 @@
2728
"tax:BatchPutTaxRegistration",
2829
"tax:DeleteTaxRegistration",
2930
"tax:PutTaxInheritance"
30-
]
31+
],
3132
"Effect": "Deny",
3233
"Resource": "*"
3334
}

roles/debian/ce_provision/meta/requirements-10.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ roles:
1616
- name: geerlingguy.firewall
1717
- name: geerlingguy.composer
1818
- name: geerlingguy.clamav
19-
- name: robertdebock.openvpn

roles/debian/ce_provision/meta/requirements-11.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ roles:
1414
- name: geerlingguy.firewall
1515
- name: geerlingguy.composer
1616
- name: geerlingguy.clamav
17-
- name: robertdebock.openvpn

roles/debian/ce_provision/meta/requirements-12.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ roles:
1414
- name: geerlingguy.firewall
1515
- name: geerlingguy.composer
1616
- name: geerlingguy.clamav
17-
- name: robertdebock.openvpn

roles/debian/firewall_config/tasks/main.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
---
2-
# @TODO remove when https://redmine.codeenigma.net/issues/58246 can be done
3-
- name: Install iptables with backports. # we have to do this in ce-dev or the contrib role will fail
4-
ansible.builtin.apt:
5-
pkg: ["iptables"]
6-
state: present
7-
default_release: buster-backports
8-
when:
9-
- is_local is defined
10-
- is_local
11-
122
- name: Shift general firewall settings to expected variables.
133
ansible.builtin.set_fact:
144
firewall_state: "{{ firewall_config.firewall_state }}"

roles/debian/ldap_server/tasks/main.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,10 @@
1414
purge: true
1515
when: ldap_server.slapd.purge
1616

17-
# @TODO remove when https://redmine.codeenigma.net/issues/58246 can be done
18-
- name: Ensure LDAP and dependencies are installed from backports.
19-
ansible.builtin.apt:
20-
pkg: ["slapd", "ldapscripts", "libldap2-dev"] # python-ldap needs libldap2-dev
21-
state: present
22-
default_release: buster-backports
23-
when:
24-
- is_local is defined
25-
- is_local
26-
2717
- name: Ensure LDAP and python-ldap and dependencies are installed.
2818
ansible.builtin.apt:
2919
pkg: ["slapd", "ldapscripts", "libldap2-dev"]
3020
state: present
31-
when: is_local is not defined
3221

3322
- name: Ensure additional dependencies for python-ldap are installed.
3423
ansible.builtin.apt:

roles/debian/lhci/tasks/main.yml

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,6 @@
1010
state: present
1111
filename: google-chrome
1212

13-
# @TODO remove when https://redmine.codeenigma.net/issues/58246 can be done
14-
- name: Install Google Chrome "headful" mode dependencies from backports.
15-
ansible.builtin.apt:
16-
name:
17-
- xorg
18-
- xvfb
19-
- gtk2-engines-pixbuf
20-
- dbus-x11
21-
- xfonts-base
22-
- xfonts-100dpi
23-
- xfonts-75dpi
24-
- xfonts-cyrillic
25-
- xfonts-scalable
26-
default_release: buster-backports
27-
state: present
28-
when:
29-
- is_local
30-
- ansible_distribution == "Debian"
31-
- ansible_distribution_major_version == "10"
32-
3313
- name: Install Google Chrome "headful" mode dependencies.
3414
ansible.builtin.apt:
3515
name:
@@ -43,27 +23,13 @@
4323
- xfonts-cyrillic
4424
- xfonts-scalable
4525
state: present
46-
when: is_local is not defined
47-
48-
# @TODO remove when https://redmine.codeenigma.net/issues/58246 can be done
49-
- name: Install VNC support from backports.
50-
ansible.builtin.apt:
51-
name: x11vnc
52-
default_release: buster-backports
53-
state: present
54-
when:
55-
- lhci.enable_vnc
56-
- is_local
57-
- ansible_distribution == "Debian"
58-
- ansible_distribution_major_version == "10"
5926

6027
- name: Install VNC support.
6128
ansible.builtin.apt:
6229
name: x11vnc
6330
state: present
6431
when:
6532
- lhci.enable_vnc
66-
- is_local is not defined
6733

6834
- name: Configure Xvfb to start on boot.
6935
ansible.builtin.shell: |

0 commit comments

Comments
 (0)