Skip to content

Commit 28f5cfb

Browse files
authored
Merge pull request #286 from lae/develop
Release 1.9.1
2 parents 0dae859 + 8931d12 commit 28f5cfb

File tree

10 files changed

+280
-53
lines changed

10 files changed

+280
-53
lines changed

.ansible-lint

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
---
12
skip_list:
23
- no-handler

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: github-actions
5+
directory: /.github/
6+
schedule:
7+
interval: weekly
8+
groups:
9+
actions-minor:
10+
update-types:
11+
- minor
12+
- patch

.github/workflows/amplify.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,33 @@
11
---
22
name: Amplify Security
33
on:
4-
pull_request: {}
4+
pull_request_target: {}
55
workflow_dispatch: {}
66
push:
7-
branches: ["main"]
7+
branches: ["main", "develop"]
88

99
permissions:
1010
contents: read
1111
id-token: write
1212

1313
jobs:
14+
authorize:
15+
environment:
16+
${{ github.event_name == 'pull_request_target' &&
17+
github.event.pull_request.head.repo.fork && 'external' || 'internal' }}
18+
runs-on: ubuntu-latest
19+
steps:
20+
- run: true
21+
1422
amplify-security-scan:
1523
name: Amplify Security Scan
24+
needs: authorize
1625
runs-on: ubuntu-latest
17-
if: (github.actor != 'dependabot[bot]')
26+
if: github.actor != 'dependabot[bot]'
1827
steps:
1928
- name: Checkout
20-
uses: actions/checkout@v4
29+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
with:
31+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
2132
- name: Amplify Runner
22-
uses: amplify-security/runner-action@v0.1.0
33+
uses: amplify-security/runner-action@926f003f3c9695a93cbc4e2f1e64eb784dcacbfc # v0.2.0

.github/workflows/ci.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ name: CI
55
pull_request: {}
66
push:
77
branches: ["main"]
8+
workflow_dispatch: {}
89

910
concurrency:
1011
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
@@ -18,23 +19,46 @@ permissions:
1819
contents: read
1920

2021
jobs:
22+
changes:
23+
runs-on: ubuntu-latest
24+
outputs:
25+
role: ${{ steps.filter.outputs.role }}
26+
steps:
27+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
28+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
29+
id: filter
30+
with:
31+
base: ${{ github.ref }}
32+
filters: |
33+
role:
34+
- 'tasks/**'
35+
- 'handlers/**'
36+
- 'defaults/**'
37+
- 'vars/**'
38+
- 'files/**'
39+
- 'library/**'
40+
- 'module_utils/**'
41+
- 'Vagrantfile'
2142
vagrant-deploy:
43+
needs: ["changes"]
44+
if: ${{ needs.changes.outputs.role == 'true' || github.event_name == 'workflow_dispatch' }}
2245
runs-on: ubuntu-22.04
2346
steps:
2447
- uses: actions/checkout@v4
2548
- run: sudo apt install nfs-kernel-server
2649
- run: sudo pipx inject ansible-core jmespath netaddr
2750
- run: ansible-galaxy install geerlingguy.ntp
51+
# yamllint disable rule:line-length
2852
- name: setup vagrant
2953
run: |
3054
# Copyright The containerd Authors
31-
#
55+
#
3256
# Licensed under the Apache License, Version 2.0 (the "License");
3357
# you may not use this file except in compliance with the License.
3458
# You may obtain a copy of the License at
35-
#
59+
#
3660
# http://www.apache.org/licenses/LICENSE-2.0
37-
#
61+
#
3862
# Unless required by applicable law or agreed to in writing, software
3963
# distributed under the License is distributed on an "AS IS" BASIS,
4064
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -50,6 +74,7 @@ jobs:
5074
sudo apt-get build-dep -y vagrant ruby-libvirt
5175
sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libvirt-dev ruby-bundler ruby-dev zlib1g-dev
5276
vagrant plugin install vagrant-libvirt
77+
# yamllint enable rule:line-length
5378
- run: >
5479
sudo -E -u ${USER}
5580
ANSIBLE_STDOUT_CALLBACK=debug

.yamllint.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
---
2-
yaml:
3-
rules:
4-
line-length:
5-
max: 120
2+
extends: default
3+
rules:
4+
line-length:
5+
max: 120
6+
braces:
7+
max-spaces-inside: 1
8+
level: error
9+
brackets:
10+
max-spaces-inside: 1
11+
level: error
12+
comments:
13+
min-spaces-from-content: 1
14+
comments-indentation: false
15+
octal-values:
16+
forbid-implicit-octal: true
17+
forbid-explicit-octal: true
18+
truthy:
19+
allowed-values:
20+
- 'true'
21+
- 'yes'
22+
- 'false'
23+
- 'no'

README.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ lae.proxmox
66
Installs and configures Proxmox Virtual Environment 6.x/7.x/8.x on Debian servers.
77

88
This role allows you to deploy and manage single-node PVE installations and PVE
9-
clusters (3+ nodes) on Debian Buster (10) and Bullseye (11). You are able to
9+
clusters (3+ nodes) on Debian Buster (10) and Bullseye (11) and Bookworm (12). You are able to
1010
configure the following with the assistance of this role:
1111

1212
- PVE RBAC definitions (roles, groups, users, and access control lists)
@@ -198,7 +198,9 @@ this group name as well, unless otherwise specified by `pve_cluster_clustername`
198198
Leaving this undefined will default to `proxmox`.
199199

200200
`pve_watchdog` here enables IPMI watchdog support and configures PVE's HA
201-
manager to use it. Leave this undefined if you don't want to configure it.
201+
manager to use it. Use `None` or leave this undefined to use the default
202+
proxmox software watchdog. If set to anything else, the value is expected to be
203+
a watchdog kernel module.
202204

203205
`pve_ssl_private_key` and `pve_ssl_certificate` point to the SSL certificates for
204206
pvecluster. Here, a file lookup is used to read the contents of a file in the
@@ -377,10 +379,12 @@ serially during a maintenance period.) It will also enable the IPMI watchdog.
377379

378380
## Role Variables
379381

382+
*About default values: Some of the default values are selected at run time and so can differ from the example listed here.*
383+
380384
```
381385
[variable]: [default] #[description/purpose]
382386
pve_group: proxmox # host group that contains the Proxmox hosts to be clustered together
383-
pve_repository_line: "deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription" # apt-repository configuration - change to enterprise if needed (although TODO further configuration may be needed)
387+
pve_repository_line: "deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription" # apt-repository configuration - change to enterprise if needed (although TODO further configuration may be needed)
384388
pve_remove_subscription_warning: true # patches the subscription warning messages in proxmox if you are using the community edition
385389
pve_extra_packages: [] # Any extra packages you may want to install, e.g. ngrep
386390
pve_run_system_upgrades: false # Let role perform system upgrades
@@ -407,7 +411,7 @@ pve_zfs_enabled: no # Specifies whether or not to install and configure ZFS pack
407411
# pve_zfs_zed_email: "" # Should be set to an email to receive ZFS notifications
408412
pve_zfs_create_volumes: [] # List of ZFS Volumes to create (to use as PVE Storages). See section on Storage Management.
409413
pve_ceph_enabled: false # Specifies wheter or not to install and configure Ceph packages. See below for an example configuration.
410-
pve_ceph_repository_line: "deb http://download.proxmox.com/debian/ceph-pacific bullseye main" # apt-repository configuration. Will be automatically set for 6.x and 7.x (Further information: https://pve.proxmox.com/wiki/Package_Repositories)
414+
pve_ceph_repository_line: "deb http://download.proxmox.com/debian/ceph-pacific bookworm main" # apt-repository configuration. Will be automatically set for 6.x and 7.x (Further information: https://pve.proxmox.com/wiki/Package_Repositories)
411415
pve_ceph_network: "{{ (ansible_default_ipv4.network +'/'+ ansible_default_ipv4.netmask) | ansible.utils.ipaddr('net') }}" # Ceph public network
412416
# pve_ceph_cluster_network: "" # Optional, if the ceph cluster network is different from the public network (see https://pve.proxmox.com/pve-docs/chapter-pveceph.html#pve_ceph_install_wizard)
413417
pve_ceph_nodes: "{{ pve_group }}" # Host group containing all Ceph nodes
@@ -898,13 +902,24 @@ pve_default_kernel_version: 1.0.1
898902
This creates a pin on the `proxmox-default-kernel` package, which is [the method suggested by PVE](https://pve.proxmox.com/wiki/Roadmap#Kernel_6.8).
899903
It can be later removed by unsetting this role variable.
900904

905+
## Troubleshooting
906+
907+
### The APT installation of proxmox-ve no longer responds, Ansible aborts, the SSH session stops.
908+
Add this section to your ``ansible.cfg``.
909+
910+
```yaml
911+
[ssh_connection]
912+
ssh_args = -o ServerAliveInterval=20
913+
```
914+
[Reference Issue](https://github.com/lae/ansible-role-proxmox/issues/279)
915+
901916
## Developer Notes
902917

903918
When developing new features or fixing something in this role, you can test out
904919
your changes by using Vagrant (only libvirt is supported currently). The
905920
playbook can be found in `tests/vagrant` (so be sure to modify group variables
906-
as needed). Be sure to test any changes on both Debian 10 and 11 (update the
907-
Vagrantfile locally to use `debian/buster64`) before submitting a PR.
921+
as needed). Be sure to test any changes on all supported versions of Debian (update the
922+
Vagrantfile locally to use `debian/bookworm64`, `debian/bullseye64`, or `debian/buster64`) before submitting a PR.
908923

909924
You can also specify an apt caching proxy (e.g. `apt-cacher-ng`, and it must
910925
run on port 3142) with the `APT_CACHE_HOST` environment variable to speed up

0 commit comments

Comments
 (0)