Nesbit7
(Gary Spencer)
1
ansible core rhel linux - how do I do the equivalent of ‘nmcli general hostname’ and set the hostname in ansible?
normally when building a server, I update the hostname using the ‘nmcli general hostname’ command.
I can’ t find where to set this using ansible, is it possible, if so how ?
gotmax23
(Maxwell G (He/They))
2
Welcome to the forum, @Nesbit7! Ansible has a builtin hostname module. Does that work for your usecase?
5 Likes
Nesbit7
(Gary Spencer)
3
sorry, I was naive in expecting all the nmcli commands to be mapped across directly to ansible nmcli module.
thanks for your excellent suggestion, it works.
thanks,
2 Likes