Ansible configuration for PiFrame devices -- used by PiFrameFleet for fleet management
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

21 lines
595 B

---
- hosts: all
become: yes
tasks:
- name: Add ansible user to PiFrame
user:
name: ansible
groups:
- sudo
shell: /bin/bash
- name: Add ansible ssh key as authorized key
authorized_key:
user: ansible
key: "{{ lookup('file', '/opt/ansible/ssh.key.pub') }}"
- name: Setup ansible with sudoers access
copy:
dest: /etc/sudoers.d/ansible
mode: '0600'
owner: root
group: root
content: ansible ALL=(ALL) NOPASSWD:ALL