Authorize ops host key on all cluster nodes

This commit is contained in:
shenlan 2025-06-25 23:39:12 +08:00
parent d1de70b020
commit 4131181bc6

View File

@ -13,8 +13,7 @@
delegate_to: "{{ ops_host }}"
run_once: true
- name: Authorize ops host key on other nodes
- name: Authorize ops host key on cluster hosts
ansible.builtin.authorized_key:
user: "{{ ansible_user | default('root') }}"
key: "{{ ops_pub_key.content | b64decode }}"
when: inventory_hostname != ops_host