Answers for "ansible set hostname from facts"

0

ansible set hostname from facts

- name: Set proper hostname
  hostname:
    #name: hostvars[inventory_hostname].ansible_host
    name: "{{ hostvars[inventory_hostname].ansible_host }}"
  become: yes
  when:
    - ansible_facts['os_family'] == 'Suse'
Posted by: Guest on June-08-2020

Browse Popular Code Answers by Language