community.proxmox.proxmox_acme_account module – Manages an ACME account

Note

This module is part of the community.proxmox collection (version 2.0.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.proxmox. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: community.proxmox.proxmox_acme_account.

New in community.proxmox 2.0.0

Synopsis

  • Create, update or delete an ACME account on the Proxmox VE.

  • When an account already exists, only the contact email can be updated (Proxmox API limitation).

  • Requires root@pam authentication.

Requirements

The below requirements are needed on the host that executes this module.

  • proxmoxer >= 2.3

  • requests

Parameters

Parameter

Comments

api_host

string / required

Specify the target host of the Proxmox VE cluster.

Uses the PROXMOX_HOST environment variable if not specified.

api_otp

string

Specify the OTP.

Uses the PROXMOX_OTP environment variable if not specified.

api_password

string

Specify the password to authenticate with.

Uses the PROXMOX_PASSWORD environment variable if not specified.

api_port

integer

Specify the target port of the Proxmox VE cluster.

Uses the PROXMOX_PORT environment variable if not specified.

api_timeout

integer

Time limit for requests towards the Proxmox VE API.

Default: 5

api_token_id

string

Specify the token ID.

Uses the PROXMOX_TOKEN_ID environment variable if not specified.

api_token_secret

string

Specify the token secret.

Uses the PROXMOX_TOKEN_SECRET environment variable if not specified.

api_user

string / required

Specify the user to authenticate with.

Uses the PROXMOX_USER environment variable if not specified.

ca_path

path

Path to a local certificate, which will be used to verify TLS connections.

Ignored if validate_certs=false.

contact

string

Contact email address for the ACME account.

Required when creating a new account (Proxmox API).

directory

string

URL of the ACME CA directory endpoint.

eab_hmac_key

string

HMAC key for External Account Binding (EAB).

eab_kid

string

Key identifier for External Account Binding (EAB).

name

string

The ACME account name (filename).

Default: "default"

state

string

Desired state of the ACME account.

Choices:

  • "present" ← (default)

  • "absent"

tos

aliases: tos_url

string

URL of the CA terms of service.

validate_certs

boolean

Validate the TLS certificates used for the connection to the Proxmox VE API.

May be set through the environment variable PROXMOX_VALIDATE_CERTS.

Choices:

  • false

  • true ← (default)

Attributes

Attribute

Support

Description

action_group

Action group: community.proxmox.proxmox

Use group/community.proxmox.proxmox in module_defaults to set defaults for this module.

check_mode

Support: full

Can run in check_mode and return changed status prediction without modifying target.

diff_mode

Support: none

Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode.

See Also

See also

Certificate management (Proxmox documentation)

ACME accounts and certificates in Proxmox VE

community.proxmox.proxmox_acme_accounts_info

List ACME account names.

community.proxmox.proxmox_acme_account_info

Retrieve information about a single ACME account.

Authentication

Complete guide for the Proxmox API authentication

Examples

- name: Create ACME account
  community.proxmox.proxmox_acme_account:
    name: example
    contact: example@example.com
    directory: https://acme-staging-v02.api.letsencrypt.org/directory
    tos: https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.pdf

- name: Update ACME account contact
  community.proxmox.proxmox_acme_account:
    name: example
    contact: other@example.com

- name: Ensure ACME account exists
  community.proxmox.proxmox_acme_account:
    name: example

- name: Remove ACME account
  community.proxmox.proxmox_acme_account:
    name: example
    state: absent

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

account

dictionary

ACME account data returned by the API.

Returned: when state=present and the account exists

contact

list / elements=string

Contact email addresses.

Returned: success

created_at

string

Account creation timestamp from the ACME API.

Returned: success

status

string

Account status (for example valid, deactivated, revoked).

Returned: success

directory

string

Directory URL of the ACME account.

Returned: when state=present and the account exists

location

string

Account resource URL from the ACME CA.

Returned: when state=present and the account exists

msg

string

Short description of the action taken.

Returned: always

name

string

The ACME account configuration name.

Returned: on success

tos

string

Terms of service URL for the account.

Returned: when state=present and the account exists

Authors

  • Clément Cruau (@PendaGTP)