Add cogitator-02 (Mac) with its own playbook
cogitator-02 is an Apple Silicon Mac on the tailnet running Hermes Agent. It gets a `mac` group and mac.yml, kept apart from site.yml so it never runs with the server's deploys (PLAYBOOK=mac.yml bin/deploy). The mac role starts by recording the Homebrew taps, formulae and casks already installed (present only, never upgrades or removes), so the first run changes nothing. No passwordless sudo on the Mac: Hermes runs as phil and takes commands over Telegram. Ansible's sudo password is vault_cogitator02.become_password and only tasks with become: true use it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f6aeca3774
commit
f53992d652
7 files changed
+73
No files matched your search
@@ -53,6 +53,7 @@ bin/deploy --tags services # every service, no system setup
|
||||
bin/deploy --tags common,cron # base setup and cron jobs only
|
||||
bin/deploy --check --diff --tags <tag> # dry run, allowed from any checkout
|
||||
PLAYBOOK=dns.yml bin/deploy # Route53 records
|
||||
PLAYBOOK=mac.yml bin/deploy # the Mac (cogitator-02)
|
||||
bin/vault-run <command> # edit secrets ($VAULT_PLAIN)
|
||||
|
||||
# First-time setup of a new server (public IP, before Tailscale)
|
||||
@@ -72,6 +73,13 @@ One server, `cogitator-01` (netcup VPS), listed twice in `hosts.yml`:
|
||||
DNS A records point at the public IP; Caddy on the same machine routes by
|
||||
subdomain.
|
||||
|
||||
A second host, `cogitator-02` (group `mac`, reached at
|
||||
`cogitator-02.porgy-porgy.ts.net` over Tailscale), is an Apple Silicon Mac
|
||||
running Hermes Agent. `mac.yml` manages it with the `mac` role, logged in as
|
||||
phil without passwordless sudo: tasks that need root set `become: true` and use
|
||||
`vault_cogitator02.become_password`. Homebrew tasks must not use become. See
|
||||
`roles/mac/README.md`.
|
||||
|
||||
### Roles (`site.yml` runs common, docker, cron)
|
||||
- **bootstrap**: user, SSH key, passwordless sudo, UFW, then `artis3n.tailscale`.
|
||||
- **common**: `aptitude`, `jq`, daily unattended security updates, SSH keys only (no root login), UFW on with default deny.
|
||||
|
||||
@@ -17,6 +17,13 @@ lists it twice, under two names:
|
||||
All public DNS records point at the public IP. Caddy on the same machine
|
||||
takes ports 80/443 and passes each subdomain to the right container.
|
||||
|
||||
### The Mac
|
||||
|
||||
`cogitator-02` (group `mac`, reached at `cogitator-02.porgy-porgy.ts.net` over
|
||||
Tailscale) is an Apple Silicon Mac that runs Hermes Agent. It has its own
|
||||
playbook, `mac.yml`, so it never runs with the server's deploys. See
|
||||
`roles/mac/README.md`.
|
||||
|
||||
## Services
|
||||
|
||||
| Category | Service | Address | Login |
|
||||
@@ -58,6 +65,7 @@ the Listmonk signup form.
|
||||
|
||||
```
|
||||
├── site.yml # Main playbook: common, docker and cron roles
|
||||
├── mac.yml # The Mac (cogitator-02): mac role
|
||||
├── bootstrap.yml # First-time server setup (user, SSH key, UFW, Tailscale)
|
||||
├── dns.yml # Route53 A records (adds current ones, removes retired ones)
|
||||
├── deploy-guard.yml # Stops real runs from anything but a clean origin/main
|
||||
@@ -122,6 +130,7 @@ bin/deploy --tags services # every service, no system setup
|
||||
bin/deploy # everything in site.yml
|
||||
bin/deploy --check --diff --tags caddy # dry run (allowed from any checkout)
|
||||
PLAYBOOK=dns.yml bin/deploy # DNS records
|
||||
PLAYBOOK=mac.yml bin/deploy # the Mac (cogitator-02)
|
||||
```
|
||||
|
||||
Category tags: `infrastructure`, `development`, `media`, `productivity`,
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# cogitator-02: an Apple Silicon Mac on the tailnet. Ansible manages it as
|
||||
# phil; only tasks that set `become: true` use sudo.
|
||||
ansible_python_interpreter: /usr/bin/python3
|
||||
ansible_become_password: "{{ vault_cogitator02.become_password }}"
|
||||
|
||||
homebrew_taps:
|
||||
- beeper/tap
|
||||
homebrew_formulae:
|
||||
- beeper/tap/bbctl
|
||||
homebrew_casks:
|
||||
- beeper
|
||||
- claude-code
|
||||
@@ -8,3 +8,8 @@ docker:
|
||||
docker-01:
|
||||
ansible_host: 100.70.169.99
|
||||
ansible_user: phil
|
||||
mac:
|
||||
hosts:
|
||||
cogitator-02:
|
||||
ansible_host: cogitator-02.porgy-porgy.ts.net
|
||||
ansible_user: phil
|
||||
@@ -0,0 +1,7 @@
|
||||
- import_playbook: deploy-guard.yml
|
||||
|
||||
# The Mac (cogitator-02). Kept out of site.yml so it never runs with the
|
||||
# server's deploys: PLAYBOOK=mac.yml bin/deploy
|
||||
- hosts: mac
|
||||
roles:
|
||||
- { role: mac, tags: ["mac"] }
|
||||
@@ -0,0 +1,15 @@
|
||||
# mac
|
||||
|
||||
Manages cogitator-02, an Apple Silicon Mac on the tailnet (`mac.yml`,
|
||||
`PLAYBOOK=mac.yml bin/deploy`).
|
||||
|
||||
- **Homebrew**: taps, formulae and casks listed in `group_vars/mac/main.yml`.
|
||||
Installs what's missing; never upgrades or removes.
|
||||
|
||||
Ansible logs in as `phil`. sudo needs phil's password, which is in the vault
|
||||
as `vault_cogitator02.become_password`; only tasks with `become: true` use it.
|
||||
phil deliberately doesn't get passwordless sudo, because Hermes Agent runs as
|
||||
phil and takes commands over Telegram.
|
||||
|
||||
Not managed here: Hermes Agent (`~/.hermes`, self-updating git install,
|
||||
launchd agent `ai.hermes.gateway`) and Tailscale.
|
||||
@@ -0,0 +1,17 @@
|
||||
# Homebrew refuses to run as root, so none of these use become.
|
||||
- name: Homebrew taps
|
||||
community.general.homebrew_tap:
|
||||
name: "{{ homebrew_taps }}"
|
||||
tags: homebrew
|
||||
|
||||
- name: Homebrew formulae
|
||||
community.general.homebrew:
|
||||
name: "{{ homebrew_formulae }}"
|
||||
state: present
|
||||
tags: homebrew
|
||||
|
||||
- name: Homebrew casks
|
||||
community.general.homebrew_cask:
|
||||
name: "{{ homebrew_casks }}"
|
||||
state: present
|
||||
tags: homebrew
|
||||
Reference in new issue
Block a user