Last active
February 20, 2021 03:34
-
-
Save acidprime/e6e8c674e192ca7fa6d2be7b69ef2998 to your computer and use it in GitHub Desktop.
Razor Server Cloud Init Broker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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