Skip to content

Instantly share code, notes, and snippets.

@rbanffy rbanffy/nsaname.yaml
Created Apr 12, 2017

What would you like to do?
Ansible playbook to rename your servers using nsaname (
- name: properly name servers
hosts: servers
become_method: sudo
- name: create hostname
local_action: command nsaname -h
register: nsaname
- name: set hostname
hostname: name={{ nsaname.stdout }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.