-
Notifications
You must be signed in to change notification settings - Fork 1
/
ansible-boilerplate.yaml
36 lines (36 loc) · 1.05 KB
/
ansible-boilerplate.yaml
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
#cloud-config
# - Required Extra Vars
# $ANSIBLE_PROFILE
hostname: ${VM_NAME}
fqdn: ${VM_NAME}
disable_root: false
users:
- name: ${USER}
groups: users, admin, docker, sudo
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
lock_passwd: false
passwd: ${PASSWD}
ssh_import_id:
- gh:${GITHUB_USER}
- name: ${VM_ADMIN}
gecos: system acct
groups: users, admin, docker, sudo
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
lock_passwd: false
passwd: ${PASSWD}
ssh_authorized_keys:
- ${VM_KEY}
package_update: ${UPDATE}
package_upgrade: ${UPGRADE}
packages:
- wget
- curl
- git
- build-essential
- python3-pip
runcmd:
- sudo -u ${VM_ADMIN} echo "export PATH=\"/home/${VM_ADMIN}/.local/bin:\$PATH\"" >> /home/${VM_ADMIN}/.profile
- git clone https://github.com/cloudymax/ansible-boilerplate.git
- sudo -u ${VM_ADMIN} env "PATH=$PATH:/home/$VM_ADMIN/.local/bin" /ansible-boilerplate/provision.sh --ansible-user ${VM_ADMIN} --profile ${ANSIBLE_PROFILE} --cows random