Skip to content

Instantly share code, notes, and snippets.

@miticojo
Last active May 12, 2017 05:47
Show Gist options
  • Save miticojo/f6ccbf82e3beccb0c6feb1e937f14488 to your computer and use it in GitHub Desktop.
Save miticojo/f6ccbf82e3beccb0c6feb1e937f14488 to your computer and use it in GitHub Desktop.
cloud init notes for rhel instance
manage_resolv_conf: true
resolv_conf:
nameservers: ['8.8.4.4', '8.8.8.8']
searchdomains:
- foo.example.com
- bar.example.com
domain: example.com
write_files:
- path: /root/rhn_register.sh
permissions: '0755'
content: |
#!/bin/bash
## download package
rpm -Uvh http://satellite01/pub/katello-ca-consumer-latest.noarch.rpm
## register machine to Satellite
subscription-manager register --org="Organization" --activationkey="KEY"
runcmd:
- [ cloud-init-per, once, rhn_reg, /root/rhn_register.sh ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment