Skip to content

Instantly share code, notes, and snippets.

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

Embed
What would you like to do?
Ansible playbook to rename your servers using nsaname (https://www.npmjs.com/package/nsaname)
---
- name: properly name servers
hosts: servers
become_method: sudo
vars:
source: 192.168.57.1
tasks:
- 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.