redhat-cop/infra.osbuild

Kickstart Task Always Runs

jjaswanson4 opened this issue · 0 comments

In roles/builder/main.yaml, this task will always run:

- name: Create kickstart file
  ansible.builtin.template:
    src: 'templates/kickstart.j2'
    dest: "/var/www/html/{{ builder_blueprint_name }}/kickstart.ks"
    mode: 0755
  when: builder_aap_url is defined

Because in roles/builder/main.yaml:

builder_aap_url: 'https://<IP_ADDRESS>/api/v2/inventories/<INVENTORY_NUMBER>/hosts/'

This causes the role to fail as not all vars used in the kickstart template need to be defined.

We should either:

  1. Define this var in the docs and remove it from defaults
  2. Update the kickstart template to handle not being fed vars so something can be templated out

A workaround for now is probably to just fill in some of the vars/files the template is looking for.