ansible-role-mastodon/tasks/docker/init.yml

27 lines
662 B
YAML
Raw Normal View History

2022-11-19 10:10:57 +01:00
---
- name: Check if Python is installed
raw: command -v python
register: python_installed
ignore_errors: True
- name: Check if yum is installed
raw: command -v yum
register: yum_installed
ignore_errors: True
- name: Check if apt is installed
raw: command -v apt
register: apt_installed
ignore_errors: True
- name: Bootstrap Python on Amazon Linux
raw: yum update && yum install -y python27
when: python_installed is failed and yum_installed is succeeded
become: true
- name: Bootstrap Python on Ubuntu Linux
raw: apt update && apt install -y python
when: python_installed is failed and apt_installed is succeeded
become: true