Files
homelab/glusterfs/ansible/setup_galery.yml
Benedikt Penner 0ac3dc09c4 add ssh key
2026-03-15 00:58:57 +01:00

23 lines
500 B
YAML

---
- name: deploy key
hosts: bastion
gather_facts: false
tasks:
- name: Set authorized key taken from file
ansible.posix.authorized_key:
user: clusteruser
state: present
key: "{{ lookup('file', './files/ansible_key.pub') }}"
- hosts: test_server
gather_facts: true
become: false
tasks:
- name: Run hostname -a
command: hostname -a
register: hostname_out
- name: Show hostname output
debug:
var: hostname_out.stdout