2020-08-28 17:28:53 +08:00
|
|
|
---
|
|
|
|
# Flatcar Container Linux ships without Python installed
|
|
|
|
|
|
|
|
- name: Check if bootstrap is needed
|
|
|
|
raw: stat /opt/bin/.bootstrapped
|
|
|
|
register: need_bootstrap
|
|
|
|
failed_when: false
|
|
|
|
changed_when: false
|
|
|
|
tags:
|
|
|
|
- facts
|
|
|
|
|
|
|
|
- name: Run bootstrap.sh
|
|
|
|
script: bootstrap.sh
|
|
|
|
become: true
|
2021-01-11 23:21:08 +08:00
|
|
|
environment: "{{ proxy_env }}"
|
2020-08-28 17:28:53 +08:00
|
|
|
when:
|
|
|
|
- need_bootstrap.rc != 0
|
|
|
|
|
2024-03-27 20:58:53 +08:00
|
|
|
# Workaround ansible https://github.com/ansible/ansible/pull/82821
|
|
|
|
# We set the interpreter rather than ansible_python_interpreter to allow
|
|
|
|
# - using virtual env with task level ansible_python_interpreter later
|
|
|
|
# - let users specify an ansible_python_interpreter in group_vars
|
|
|
|
|
|
|
|
- name: Make interpreter discovery works on Flatcar
|
2020-08-28 17:28:53 +08:00
|
|
|
set_fact:
|
2024-10-03 16:54:27 +08:00
|
|
|
ansible_interpreter_python_fallback: "{{ (ansible_interpreter_python_fallback | default([])) + [ '/opt/bin/python' ] }}"
|
2020-08-28 17:28:53 +08:00
|
|
|
|
|
|
|
- name: Disable auto-upgrade
|
2024-07-26 16:11:39 +08:00
|
|
|
systemd_service:
|
2020-08-28 17:28:53 +08:00
|
|
|
name: locksmithd.service
|
|
|
|
masked: true
|
|
|
|
state: stopped
|
|
|
|
when:
|
|
|
|
- coreos_locksmithd_disable
|