Skip to content

Instantly share code, notes, and snippets.

@jlund
Forked from ScottSturdivant/main.yml
Last active December 18, 2015 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jlund/5775635 to your computer and use it in GitHub Desktop.
Save jlund/5775635 to your computer and use it in GitHub Desktop.
- name: Set the hostname in rc.conf
lineinfile: dest=/etc/rc.conf regexp="^hostname" line='hostname="{{ hostname }}"'
register: hostnamestatus
- name: Set the hostname
command: hostname {{ hostname }}
when: hostnamestatus.changed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment