forked from saltstack-formulas/lxd-formula
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lxd-user-data-for-cloud-init.yml
87 lines (83 loc) · 2.16 KB
/
lxd-user-data-for-cloud-init.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
config:
user.user-data: |
#cloud-config
output:
all: '| tee -a /var/log/cloud-init-output.log'
runcmd:
- set -xe
- install -D -m 644 /dev/null '/etc/systemd/system/juju-clean-shutdown.service'
- |-
printf '%s\n' '
[Unit]
Description=Stop all network interfaces on shutdown
DefaultDependencies=false
After=final.target
[Service]
Type=oneshot
ExecStart=/sbin/ifdown -a -v --force
StandardOutput=tty
StandardError=tty
[Install]
WantedBy=final.target
' > '/etc/systemd/system/juju-clean-shutdown.service'
- /bin/systemctl enable '/etc/systemd/system/juju-clean-shutdown.service'
- install -D -m 644 /dev/null '/var/lib/juju/nonce.txt'
- printf '%s\n' 'user-admin:bootstrap' > '/var/lib/juju/nonce.txt'
users:
- groups:
- adm
- audio
- cdrom
- dialout
- dip
- floppy
- netdev
- plugdev
- sudo
- video
lock_passwd: true
name: ubuntu
shell: /bin/bash
ssh-authorized-keys:
runcmd:
- set -xe
- install -D -m 644 /dev/null '/etc/systemd/system/juju-clean-shutdown.service'
- |-
printf '%s\n' '
[Unit]
Description=Stop all network interfaces on shutdown
DefaultDependencies=false
After=final.target
[Service]
Type=oneshot
ExecStart=/sbin/ifdown -a -v --force
StandardOutput=tty
StandardError=tty
[Install]
WantedBy=final.target
' > '/etc/systemd/system/juju-clean-shutdown.service'
- /bin/systemctl enable '/etc/systemd/system/juju-clean-shutdown.service'
- install -D -m 644 /dev/null '/var/lib/juju/nonce.txt'
- printf '%s\n' 'user-admin:bootstrap' > '/var/lib/juju/nonce.txt'
users:
- groups:
- adm
- audio
- cdrom
- dialout
- dip
- floppy
- netdev
- plugdev
- sudo
- video
lock_passwd: true
name: ubuntu
shell: /bin/bash
ssh-authorized-keys:
- ssh-rsa KEY_REDACTED
Juju:juju-client-key
- ssh-rsa KEYS_REDACTED
Juju:mbruzek@workhorse
sudo:
- ALL=(ALL) NOPASSWD:ALL