- Put desired information into hostnames.json
- Comment out whole 'ZABBIX SECTION' in pl-rename.yml if zabbix is not installed.
- Run
ansible-playbook pl-rename.yml --extra-vars="hosts_group=<name of hostgroup from your 'hosts' file>"
- Enjoy 💯
magzim21/ansible_change_hostnames
ANSIBLE batch rename hostnames. It works with systemd, but can easily be adopted for init systems.
PythonMIT