ClusterAPI.imageBuilder/ansible/roles/setup/tasks/bootstrap-flatcar.yml

29 lines
780 B
YAML
Raw Permalink Normal View History

2023-02-22 20:24:42 +00:00
---
# Flatcar ships without Python installed
- name: Check if bootstrap is needed
raw: stat /opt/bin/.bootstrapped
register: need_bootstrap
environment: {}
failed_when: false
changed_when: false
tags:
- facts
- name: Set the ansible_python_interpreter fact
set_fact:
ansible_python_interpreter: "{{ external_binary_path }}/python"
tags:
- facts
# Some tasks are not compatible with Flatcar, so to centralize and deduplicate the logic of checking
# if we run on Flatcar, we define it here.
#
# This is required until https://github.com/ansible/ansible/issues/77537 is fixed and used.
- name: Override Flatcar's OS family
set_fact:
ansible_os_family: Flatcar
when: ansible_os_family == "Flatcar Container Linux by Kinvolk"
tags:
- facts