forked from codyde/CAS-Cloud-Init-Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom-user-pass.yaml
49 lines (49 loc) · 1.11 KB
/
custom-user-pass.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
37
38
39
40
41
42
43
44
45
46
47
48
49
inputs:
hostname:
type: string
username:
type: string
title: Username
default: adminuser
password:
type: string
title: Password
encrypted: true
default: VMware123!
resources:
web1:
type: Cloud.Machine
networks:
- name: '${Cloud_Network_1.name}'
properties:
count: 1
image: Ubuntu
constraints:
- tag: 'cloud:vsphere'
flavor: medium
cloudConfig: |
#cloud-config
hostname: ${input.hostname}
ssh_pwauth: yes
chpasswd:
list: |
${input.username}:${input.password}
expire: false
users:
- default
- name: ${input.username}
passwd: ${input.password}
lock_passwd: false
sudo: ['ALL=(ALL) NOPASSWD:ALL']
groups: [wheel, sudo, admin]
shell: '/bin/bash'
runcmd:
- echo "Defaults:${input.username}
hostname: '${input.hostname}'
networks:
- name: '${AppNetwork.name}'
AppNetwork:
type: Cloud.Network
properties:
name: LB
networkType: existing