Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyphreak committed Feb 26, 2024
1 parent 67fdbd5 commit 4d01373
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
ansible.builtin.file:
state: directory
path: "{{ ubuntu_installer_target_dir }}"
mode: 0750

- name: Fetch source ISO
ansible.builtin.get_url:
url: "{{ ubuntu_installer_image_url }}"
dest: "{{ ubuntu_installer_iso_path }}"
mode: 0640

- name: Extract ISO contents
ansible.builtin.command: "7z -y x {{ ubuntu_installer_iso_path }} -o{{ tmpdir_dest.path }}"
Expand All @@ -33,18 +35,20 @@
ansible.builtin.file:
dest: "{{ tmpdir_dest.path }}{{ ubuntu_installer_cloudinit }}"
state: directory
mode: 0755

- name: Set interface prefix
ansible.builtin.set_fact:
ubuntu_installer_interface_prefix: "{{ ubuntu_installer_interface_ip | ipaddr('prefix') }}"
ubuntu_installer_interface_prefix: "{{ _interface_ip | ipaddr('prefix') }}"
vars:
ubuntu_installer_interface_ip: "{{ ubuntu_installer_interface.ipaddress }}/{{ ubuntu_installer_interface.netmask }}"
_interface_ip: "{{ ubuntu_installer_interface.ipaddress }}/{{ ubuntu_installer_interface.netmask }}"
when: ubuntu_installer_interface.static | bool

- name: Create cloud-init user data
ansible.builtin.template:
src: "user-data.j2"
dest: "{{ tmpdir_dest.path }}{{ ubuntu_installer_cloudinit }}/user-data"
mode: 0640
vars:
_ssh_user: "{{ ubuntu_installer_username }}"
_ssh_pass: "{{ ubuntu_installer_password }}"
Expand All @@ -58,12 +62,13 @@
_mirror_security: "{{ ubuntu_installer_security_mirror }}"
_packages: "{{ ubuntu_installer_image_packages }}"
_storage_layout: "{{ __ubuntu_installer_live_storage_map[ubuntu_installer_partman_method] }}"
_storage_config: "{{ ubuntu_installer_live_storage | default(__ubuntu_installer_live_storage[ubuntu_installer_partman_method]) }}"
_storage_config: "{{ ubuntu_installer_live_storage | default(_storage_layout) }}"

- name: Create cloud-init meta data
ansible.builtin.file:
dest: "{{ tmpdir_dest.path }}{{ ubuntu_installer_cloudinit }}/meta-data"
state: touch
mode: 0660

- name: Detect isolinux bootloader
ansible.builtin.stat:
Expand All @@ -86,6 +91,7 @@
}
grub_platform
mode: 0664
vars:
nocloud_dir: "{{ ubuntu_installer_cloudinit }}"

Expand All @@ -102,6 +108,7 @@
ansible.builtin.template:
src: isolinux.live.j2
dest: "{{ tmpdir_dest.path }}/isolinux/txt.cfg"
mode: 0640
vars:
kernel_file: /casper/vmlinuz
initrd_file: /casper/initrd
Expand Down

0 comments on commit 4d01373

Please sign in to comment.