Skip to content

Instantly share code, notes, and snippets.

@acidprime
Last active February 20, 2021 03:34
Show Gist options
  • Save acidprime/e6e8c674e192ca7fa6d2be7b69ef2998 to your computer and use it in GitHub Desktop.
Save acidprime/e6e8c674e192ca7fa6d2be7b69ef2998 to your computer and use it in GitHub Desktop.
Razor Server Cloud Init Broker
---
certname:
description: "Cloud-init key"
apt_sources:
description: "Cloud-init key"
apt_update:
description: "Cloud-init key"
groups:
description: "Cloud-init key"
users:
description: "Cloud-init key"
disable_root:
description: "Cloud-init key"
preserve_hostname:
description: "Cloud-init key"
package_update:
description: "Cloud-init key"
package_upgrade:
description: "Cloud-init key"
packages:
description: "Cloud-init key"
runcmd:
description: "Cloud-init key"
puppet:
description: "Cloud-init key"
rsyslog:
description: "Cloud-init key"
cloud_init_modules:
description: "Cloud-init key"
cloud_config_modules:
description: "Cloud-init key"
cloud_final_modules:
description: "Cloud-init key"
timezone:
description: "Cloud-init key"
manage_resolv_conf:
description: "Cloud-init key"
resolv_conf:
description: "Cloud-init key"
datasource_list:
description: "Cloud-init key"
datasource:
description: "Cloud-init key"
#!/bin/bash
<% require 'shellwords' %>
<% require 'yaml' %>
set -u
set -e
<% unless broker.empty? %>
echo <%= broker.to_h.to_yaml.shellescape %> > /etc/cloud/cloud.cfg.d/99_razor.cfg
<% end %>
cat /etc/cloud/cloud.cfg.d/99_razor.cfg
cloud-init init --local
cloud-init init
cloud-init modules --mode=config
cloud-init modules --mode=final
curl -sL "<%= stage_done_url %>" || fail "curl failed to log broker completion"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment