--- - name: Validate bootstrap input ansible.builtin.import_tasks: _validate.yml - name: Create API filesystem mountpoints in installroot when: os_family == 'RedHat' ansible.builtin.file: path: "/mnt/{{ item }}" state: directory mode: "0755" loop: - dev - proc - sys - name: Mount API filesystems into installroot when: os_family == 'RedHat' ansible.posix.mount: src: "{{ item.src }}" path: "/mnt/{{ item.path }}" fstype: "{{ item.fstype }}" opts: "{{ item.opts | default(omit) }}" state: ephemeral loop: - { src: proc, path: proc, fstype: proc } - { src: sysfs, path: sys, fstype: sysfs } - { src: /dev, path: dev, fstype: none, opts: bind } - { src: devpts, path: dev/pts, fstype: devpts, opts: "gid=5,mode=620" } loop_control: label: "{{ item.path }}" - name: Run OS-specific bootstrap process vars: bootstrap_var_key: "{{ 'bootstrap_' + (os | replace('-lts', '') | replace('-', '_')) }}" ansible.builtin.include_tasks: "{{ bootstrap_os_task_map[os] }}" - name: Ensure chroot uses live environment DNS ansible.builtin.file: src: /run/NetworkManager/resolv.conf dest: /mnt/etc/resolv.conf state: link force: true