Initial infrastructure documentation - comprehensive homelab reference
This commit is contained in:
26
add-acme-provisioner.py
Normal file
26
add-acme-provisioner.py
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
import json
|
||||
|
||||
# Read the config
|
||||
with open('C:/Users/Fred/AppData/Local/Temp/ca.json', 'r') as f:
|
||||
config = json.load(f)
|
||||
|
||||
# Add ACME provisioner
|
||||
acme_provisioner = {
|
||||
"type": "ACME",
|
||||
"name": "acme",
|
||||
"forceCN": True,
|
||||
"claims": {
|
||||
"maxTLSCertDuration": "8760h",
|
||||
"defaultTLSCertDuration": "8760h"
|
||||
}
|
||||
}
|
||||
|
||||
# Add to provisioners list
|
||||
config['authority']['provisioners'].append(acme_provisioner)
|
||||
|
||||
# Write updated config
|
||||
with open('C:/Users/Fred/AppData/Local/Temp/ca.json', 'w') as f:
|
||||
json.dump(config, f, indent=4)
|
||||
|
||||
print("ACME provisioner added successfully")
|
||||
Reference in New Issue
Block a user