Skip to content

Instantly share code, notes, and snippets.

@Honghe
Created May 2, 2018 06:52
Show Gist options
  • Save Honghe/dd2e47d21b80858872548ce33b13b599 to your computer and use it in GitHub Desktop.
Save Honghe/dd2e47d21b80858872548ce33b13b599 to your computer and use it in GitHub Desktop.
delete cloudinit function of reseting hostname on reboot
---
- name: delete cloud-init
hosts: cdh
remote_user: root
tasks:
- shell: |
sed -i '/- set_hostname/d' /etc/cloud/cloud.cfg
sed -i '/- update_hostname/d' /etc/cloud/cloud.cfg
sed -i '/- update_etc_hosts/d' /etc/cloud/cloud.cfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment