forked from codyde/CAS-Cloud-Init-Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpuppet-bolt-dns.yaml
39 lines (39 loc) · 1.19 KB
/
puppet-bolt-dns.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
inputs:
hostname:
type: string
windowsAdmin:
type: string
password:
type: string
encrypted: true
resources:
web1:
type: Cloud.Machine
networks:
- name: '${Cloud_Network_1.name}'
properties:
image: Ubuntu
constraints:
- tag: 'cloud:vsphere'
flavor: medium
cloudConfig: |
#cloud-config
hostname: ${input.hostname}
packages:
- wget
runcmd:
- wget https://apt.puppet.com/puppet6-release-xenial.deb
- sudo dpkg -i puppet6-release-xenial.deb
- sudo apt-get update
- sudo apt-get install puppet-bolt
- git clone https://github.com/codyde/Windows-dns /opt/puppetlabs/bolt/lib/ruby/gems/2.5.0/gems/bolt-1.0.0/modules/dns
- '/usr/local/bin/bolt task run --nodes winrm://humbledc01.humblelab.com --user ${input.windowsAdmin} --password ${input.password} --no-ssl dns::dns hostname=${input.hostname} domain="humblelab.com" ip="10.0.0.0"'
networks:
- name: '${Cloud_Network_1.name}'
Cloud_Network_1:
type: Cloud.Network
properties:
name: Core
networkType: existing
constraints:
- tag: 'cloud:vsphere'