Commit Graph

7 Commits (91c23894a22e37d8a8492d41ad37356aff1a30a4)

Author SHA1 Message Date
Dustin 91c23894a2 Set shell when using su for become
infra/host-provisioner/pipeline/head This commit looks good Details
Since the host-provisioner connects to the target machine as root, it
only uses "become" to drop privileges.  Unprivileged users often have a
non-login shell set (e.g. `/bin/false` or `/sbin/nologin`), which
prevents `su` from working, as it uses the target user's shell by
default.  Fortunately, we can override the shell with the `-s` argument,
which we can tell Ansible to add via the `ansible_become_flags`
variable.
2025-07-09 08:49:54 -05:00
Dustin 926b679865 Set become method via variable
infra/host-provisioner/pipeline/head This commit looks good Details
It seems like setting the `ansible_become_method` variable as a group
variable overrides the `--become-method` CLI argument.  If we set the
variable on the command line, that _should_ take precedence.
2025-07-08 20:59:45 -05:00
Dustin d860a25986 Set become method to su
infra/host-provisioner/pipeline/head This commit looks good Details
Since the host-provisioner connects to remote machines as _root_, it
normally doesn't use Ansible's "become" system at all.  Some tasks,
though, need to to use it to switch to a specific unprivileged user.
For those, `doas` is not appropriate, since it doesn't permit root by
default.  Rather than adjust this configuration, let's switch to `su`
which requires no configuration, and does allow root.
2025-07-08 20:11:19 -05:00
Dustin 2500dc511d Add debug logging
infra/host-provisioner/pipeline/head This commit looks good Details
Trying to figure out why it's not cloning the correct branch...
2025-02-07 21:43:38 -06:00
Dustin cefdd39e2d ci: Add Jenkins pipeline
infra/host-provisioner/pipeline/head This commit looks good Details
2025-02-07 21:16:23 -06:00
Dustin 9d38a8ac01 Begin host provisioner script
The _Host Provisioner_ is a tool that runs an Anisble playbook to
initially provision a new machine.  It is intended to run as a
Kubernetes Job, created by a webhook that is triggered when the machine
boots up for the first time.  The tool retrieves information about the
new machine (its hostname and SSH host keys) from a message queue,
published by the same webhook that launched the job.  It then clones
the configuration policy (optionally from the branch provided in the
host info message) and applies the `site.yml` playbook.
2025-02-07 19:00:15 -06:00
Dustin 9a203585a0 Initial commit 2025-02-05 20:11:08 -06:00