-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser-data.yml
67 lines (56 loc) · 2.73 KB
/
user-data.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#cloud-config
# vim: syntax=yaml
#
# Set your hostname here, the manage_etc_hosts will update the hosts file entries as well
hostname: pi.local
manage_etc_hosts: true
# don't write debian.org into apt mirrors
apt_preserve_sources_list: true
# You could modify this for your own user information
users:
- name: josh
primary group: users
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
groups: users,docker,adm,dialout,audio,plugdev,netdev,video
ssh-import-id: None
lock_password: true
ssh-authorized-keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQ2sbYMw64qs0RhpbD5vGNklhIRha15EjLQX1fT0TPwOz4dV3kmD5kYkjbYCJezUjmgCdwRD3ikxMDW5YHiosHkIJlbFxat/Wn7xEENXlUoFlHXcW9vMZvUD5gEY64O8OU6/NjsxzK5rzKbqhLsCkdEMEp3iowRDapJV6W+9ezAAE4MuXywlpLu3ghU6O5EM4su85xduLvAmsdprk8QC2danvt+H4KBKG9/PuaKjwpQAyrrr5xlvTpDkc9FmiWLxkuJZm30OeU9HG5+aKe9Iz9Fr8MIEwB4GXmIm0u97IbUblpFJjdSLtVfnq+l4BnmzM9fZd8VYyZv/6nUrg/HSXH
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCsqOxShiA+rMwb29PvIwPamQqCMvB7tw1kV9ipmzLvl6FtWTdOJuiqosO1UWxPM/F7yQLJFkfOxlPgwAKy8XrSbScfotDklIM0pbgQzDHSi2uA47/7I/a/vMNs+nez46+CqI2H6OVPHAzopxYsw8M7ksEQYqsSWgcX2Q3NusRns0WurQp+cES74roQhrl3KyrRGaH7ZfgK2q1ojZBprT37FL2FZ5gXrSmnezyN4TBsl+BmAcKgY2XesrpjwiF9sF4zCXVHRKKpXkN9KTpU5uEpNkc9fNBs/XsQcDXzGVyyFpLO/rLhPG42xoakLakVMQW7GWDYBLEAAQqgWujbH4uh
# Static IP address and minio
write_files:
- content: |
persistent
# Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac private
# static IP configuration:
interface eth0
static ip_address=192.168.2.2/24
# static ip6_address=fd51:42f8:caae:d92e::ff/64
static routers=192.168.2.1
static domain_name_servers=127.0.0.1 8.8.8.8
path: /etc/dhcpcd.conf
# Update our packages on first boot, saves us some time
package_update: true
package_upgrade: true
package_reboot_if_required: true
# Install any additional packages you need here
# I add ntp because.. without it, rpi is useless in keeping track of time.
packages:
- ntp
# Set the locale of the system
locale: "en_US.UTF-8"
# Set the timezone
# Value of 'timezone' must exist in /usr/share/zoneinfo
timezone: "America/New_York"
# These commands will be ran once on first boot only
runcmd:
- 'systemctl restart avahi-daemon'
- 'systemctl restart docker'
- 'git clone --depth 1 https://github.com/airbornelamb/rpi.git /var/rpi'
- 'docker swarm init'
- 'curl -L https://portainer.io/download/portainer-agent-stack.yml -o portainer-agent-stack.yml'
- 'docker stack deploy --compose-file=portainer-agent-stack.yml portainer'
#- 'docker stack deploy --compose-file=/var/rpi/pihole-stack.yml --resolve-image=never pihole'
#- 'mc config host add minio http://192.168.1.51 BKIKJAA5BMMU2RHO6IBB V7f1CwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr12'