Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (21 sloc) 758 Bytes
- name: Add a group pi
group: name=pi
- name: Add a group docker
group: name=docker
- name: Add user pi to group docker
user: name=pi groups=docker,pi append=yes shell=/bin/bash
- name: Add pi to to sudoers
lineinfile:
dest: /etc/sudoers
state: present
line: "pi ALL=(ALL) NOPASSWD: ALL"
insertafter: "EOF"
- name: Verify ~/.ssh
file: path="/home/pi/.ssh" state=directory recurse=no owner=pi group=pi
- name: Copy SSH Key
copy: src="{{ ssh.pub_key_path }}" dest=/home/pi/.ssh/authorized_keys mode=0600 owner=pi group=pi
- name: Add user pi to group docker
user: name=pi groups=docker append=yes
- name: Set user password
user: name=pi password="{{ user.password }}"
when: user is defined and user.password is defined
You can’t perform that action at this time.