forked from tojo/heimbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.yml
31 lines (23 loc) · 829 Bytes
/
bootstrap.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Bootstrap a fresh Respberry Pi
---
- hosts: heimbot
pre_tasks:
- name: Set Hostname
copy: content={{ inventory_hostname }} dest=/etc/hostname
register: hostname
- name: Set Hostname
command: hostname -b -F /etc/hostname
when: hostname|changed
- name: Install Base Packages
apt:
name: ['zsh', 'sudo']
state: present
update_cache: yes
cache_valid_time: 3600
- name: Set sudo to Allow Passwordless sudo for Admin Group members
lineinfile: "dest=/etc/sudoers state=present line='%adm ALL = NOPASSWD: ALL' insertafter='^%sudo(\\s+)ALL' validate='visudo -cf %s'"
roles:
- { role: unix_users, tags: [ 'unix_users' ], _unix_users: "{{ UNIX_USERS }}" }
post_tasks:
- name: Deactivate Root Login
user: name=root password="*"