ansible: hand asxpio-services over to NixOS
asxpio-services moves to NixOS (branch nix). Without this, the next deploy from main would apply the Debian roles to it. Take it out of every play: services_servers is empty, and the host stays in the inventory only so that ops's roles can still read its addresses and public IP. The xmpp_cert_sync tasks that set up the receiving end on services through delegate_to now run only while services is managed here; on NixOS that end is part of its configuration. A dry run of site.yaml against production with this change: ops ok=62 changed=0, every services play skipped. Assisted-by: Claude:opus-5-5
This commit is contained in:
parent
ebd4f110f4
commit
ffb81b4523
1 changed files with 26 additions and 10 deletions
|
|
@ -8,12 +8,16 @@
|
|||
comment: xmpp-cert-sync@{{ inventory_hostname }}
|
||||
register: xmpp_cert_sync_key
|
||||
|
||||
# The receiving end is set up here only while services is managed by
|
||||
# Ansible; on NixOS it is part of nixos/hosts/asxpio-services, which
|
||||
# authorizes this host's existing key until ops converts too.
|
||||
- name: Install the receiving script on asxpio-services
|
||||
ansible.builtin.copy:
|
||||
src: xmpp-cert-install
|
||||
dest: /usr/local/bin/xmpp-cert-install
|
||||
mode: "0755"
|
||||
delegate_to: asxpio-services
|
||||
when: "'asxpio-services' in groups['services_servers'] | default([])"
|
||||
|
||||
- name: Authorize the key for that script only, from ops only
|
||||
ansible.posix.authorized_key:
|
||||
|
|
@ -23,7 +27,9 @@
|
|||
comment: xmpp-cert-sync
|
||||
delegate_to: asxpio-services
|
||||
# In a dry run on a fresh host the key does not exist yet
|
||||
when: xmpp_cert_sync_key.public_key is defined
|
||||
when:
|
||||
- xmpp_cert_sync_key.public_key is defined
|
||||
- "'asxpio-services' in groups['services_servers'] | default([])"
|
||||
|
||||
- name: Install the sync script
|
||||
ansible.builtin.template:
|
||||
|
|
|
|||
Loading…
Reference in a new issue