Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate most of bhyve config #8

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add sample cloudinit data
  • Loading branch information
Robert Fisher committed Jul 28, 2024
commit b5a5a5a365e845a5cd867efdf8874fb58c5ea939
2 changes: 2 additions & 0 deletions spec/resources/cloud-init/common/meta-data
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
instance-id: <%= zone %>
local-hostname: <%= zone %>
16 changes: 16 additions & 0 deletions spec/resources/cloud-init/common/network-config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
network:
version: 2
ethernets:
enp0s6:
dhcp4: false
addresses:
- <%= ip_address %>
gateway4: <%= gateway %>
nameservers:
addresses:
- 192.168.1.53
- 8.8.4.4
routes:
- to: 0.0.0.0/0
via: <%= default_router %>

12 changes: 12 additions & 0 deletions spec/resources/cloud-init/common/user-data
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#cloud-config
hostname: <%= zone %>
users:
- name: ansible
sudo: ALL=(ALL) NOPASSWD:ALL
groups: users
home: /home/ansible
shell: /bin/bash
lock_passwd: false
passwd: $encrypted000password000
ssh_authorized_keys:
- ssh-rsa l0tsOfcRypT05tufftHAtM4kesAk3y user@hostname
2 changes: 2 additions & 0 deletions spec/resources/cloud-init/rendered/meta-data
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
instance-id: test-bhyve
local-hostname: test-bhyve
16 changes: 16 additions & 0 deletions spec/resources/cloud-init/rendered/network-config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
network:
version: 2
ethernets:
enp0s6:
dhcp4: false
addresses:
- 192.168.1.80/24
gateway4: 192.168.1.1
nameservers:
addresses:
- 192.168.1.53
- 8.8.4.4
routes:
- to: 0.0.0.0/0
via: 192.168.1.1

12 changes: 12 additions & 0 deletions spec/resources/cloud-init/rendered/user-data
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#cloud-config
hostname: test-bhyve
users:
- name: ansible
sudo: ALL=(ALL) NOPASSWD:ALL
groups: users
home: /home/ansible
shell: /bin/bash
lock_passwd: false
passwd: $encrypted000password000
ssh_authorized_keys:
- ssh-rsa l0tsOfcRypT05tufftHAtM4kesAk3y user@hostname