Skip to content

Continuous Deployment Role#

Creates a user (called off by default) and adds a SSH public key to its authorized_keys. Those are used to setup a CI/CD using GitHub Actions.

Setup a new node#

To setup a new node, create a file called host_vars/<node_name>/continuous-deployment.yml with the following variable:

continuous_deployment__ssh_public_keys:

  - "ssh-ed25519 AAAAC3Nz[...] off@<node_name>"

The SSH public keys put in this are used to authenticate the deployer users. The corresponding private key should be added to the GitHub Actions secrets (use a different key for each repository).

A public/private keypair can be generated with

ssh-keygen -t ed25519 -C "off@<node_name>"

Defaults#

---
# Deployment user
continuous_deployment__user: "off"

# Public keys of deployers (ideally one per repo that deploy on the VM)
continuous_deployment__ssh_public_keys: []
# Eventual proxy jump host
continuous_deployment__proxy_jump_host: