Ich will den Zertifikats-Check via ansible anstossen. Folgendes ist gemäss API-Beschrieb das von mir gewünschte Cmd:
Funktioniert nicht (400). - Wenn ich
gemäss 'help' ist obiges aber korrekt - OPTIONS sind optional ... daher ja auch der Name ;-) :
habe auch versucht
Was mache ich falsch? Oder ist das ein Option-Parsing-Bug? oder ein Help-Text-Bug?
PS: meine Version auf dieser Lab-Instanz - aktuellste!
Code:
root@mailgw:/opt/scripts# pmgsh set /nodes/mailgw/certificates/acme/smtp
400 Parameter verification failed.
force: Certificate does not expire within the next 30 days, and 'force' is not set.
set nodes/mailgw/certificates/acme/smtp [OPTIONS]
Funktioniert nicht (400). - Wenn ich
--force nutze, funktioniert's ... d.h. es wird ein forcierter Renewal angestossen und durchgeführt! - ABER das will ich eben nicht, sondern ein Renewal soll nur regulär geschehen (TTL < 30d).gemäss 'help' ist obiges aber korrekt - OPTIONS sind optional ... daher ja auch der Name ;-) :
Bash:
root@mailgw:/opt/scripts# pmgsh help /nodes/mailgw/certificates/acme/smtp -v
...
USAGE: set /nodes/{node}/certificates/acme/{type} [OPTIONS]
Renew existing certificate from CA.
--force <boolean> (default=0)
Force renewal even if expiry is more than 30 days away.
...
habe auch versucht
force explizit auf 0 zu setzen, was gemäss help auch Syntax-konform ist. Aber das endet ebenfalls mit dem Fehler 400. Die Idee, die Optionen nur mit einem '-' zu versuchen habe ich von der Dok (https://pmg.proxmox.com/pmg-docs/pmgsh.1.html). Die widerspricht dem Help-Text in dieser Beziehung :-(
Bash:
root@mailgw:/opt/scripts# pmgsh set /nodes/mailgw/certificates/acme/smtp --force 0
400 Parameter verification failed.
force: Certificate does not expire within the next 30 days, and 'force' is not set.
set nodes/mailgw/certificates/acme/smtp [OPTIONS]
root@mailgw:/opt/scripts# pmgsh set /nodes/mailgw/certificates/acme/smtp --force=0
400 Parameter verification failed.
force: Certificate does not expire within the next 30 days, and 'force' is not set.
set nodes/mailgw/certificates/acme/smtp [OPTIONS]
root@mailgw:/opt/scripts# pmgsh set /nodes/mailgw/certificates/acme/smtp -force=0
400 Parameter verification failed.
force: Certificate does not expire within the next 30 days, and 'force' is not set.
set nodes/mailgw/certificates/acme/smtp [OPTIONS]
root@mailgw:/opt/scripts# pmgsh set /nodes/mailgw/certificates/acme/smtp -force 0
400 Parameter verification failed.
force: Certificate does not expire within the next 30 days, and 'force' is not set.
set nodes/mailgw/certificates/acme/smtp [OPTIONS]
Was mache ich falsch? Oder ist das ein Option-Parsing-Bug? oder ein Help-Text-Bug?
PS: meine Version auf dieser Lab-Instanz - aktuellste!
Bash:
root@mailgw:/opt/scripts# pmgversion -v
proxmox-mailgateway-container: 8.2.0 (API: 8.2.1/5f1bd658e7ca, running kernel: 6.14.8-2-pve)
pmg-api: 8.2.1
pmg-gui: 4.2.1
clamav-daemon: 1.0.7+dfsg-1~deb12u1
ifupdown: residual config
ifupdown2: 3.2.0-1+pmx11
libarchive-perl: 3.6.2
libjs-extjs: 7.0.0-5
libjs-framework7: 4.4.7-2
libproxmox-acme-perl: 1.6.0
libproxmox-acme-plugins: 1.6.0
libpve-apiclient-perl: 3.3.2
libpve-common-perl: 8.3.4
libpve-http-server-perl: 5.2.2
libxdgmime-perl: 1.1.0
lvm2: not correctly installed
pmg-docs: 8.2.0
pmg-i18n: 3.4.5
pmg-log-tracker: 2.5.0
proxmox-mini-journalreader: 1.5
proxmox-spamassassin: 4.0.1-2
proxmox-widget-toolkit: 4.3.13
pve-xtermjs: 5.5.0-2