From 60e24efba3ab36c83e5a87f5da9dab4305463a5f Mon Sep 17 00:00:00 2001 From: CN-JS-HuiBai Date: Sun, 19 Apr 2026 02:03:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20install=5Fpython3.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install_python3.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 install_python3.yml diff --git a/install_python3.yml b/install_python3.yml new file mode 100644 index 0000000..cd0b77c --- /dev/null +++ b/install_python3.yml @@ -0,0 +1,20 @@ +- name: bootstrap python3 + hosts: all + gather_facts: false + + tasks: + - name: check python3 exists + raw: command -v python3 + register: py3_check + ignore_errors: true + + - name: install python3 (debian/ubuntu) + raw: | + apt update && + apt install -y python3 python3-apt + when: py3_check.rc != 0 + + - name: install python3 (centos) + raw: | + yum install -y python3 + when: py3_check.rc != 0 \ No newline at end of file