Packer.Images/ansible/roles/firstboot/files/ansible_payload/roles/network/tasks/main.yml

11 lines
335 B
YAML
Raw Normal View History

- name: Set hostname
ansible.builtin.hostname:
name: "{{ ovfproperties['guestinfo.hostname'] }}"
2021-06-09 20:11:06 +00:00
- name: Create netplan configuration file
ansible.builtin.template:
src: netplan.j2
dest: /etc/netplan/00-installer-config.yaml
- name: Apply netplan configuration
ansible.builtin.shell:
2021-06-10 10:32:27 +00:00
cmd: /usr/sbin/netplan apply