44 lines
1.6 KiB
YAML
44 lines
1.6 KiB
YAML
- name: Prepare
|
||
hosts: all
|
||
tasks:
|
||
- name: Detect OS family
|
||
ansible.builtin.setup:
|
||
gather_subset:
|
||
- "min"
|
||
|
||
- name: Обновляем пакеты для работы с Ansible в RockyLinux (Centos/RedHat)
|
||
when: ansible_facts['os_family'] == "RedHat"
|
||
block:
|
||
- name: Устанавливаем репозиторий AppStream (если его нет)
|
||
ansible.builtin.raw: dnf config-manager --set-enabled appstream
|
||
changed_when: false
|
||
|
||
- name: Установить rsync
|
||
ansible.builtin.raw: dnf install -y rsync
|
||
changed_when: false
|
||
|
||
- name: Устанавливаем Python 3.8
|
||
ansible.builtin.raw: dnf install -y python38 python38-pip
|
||
changed_when: false
|
||
|
||
- name: Обновляем символическую ссылку python3
|
||
ansible.builtin.raw: alternatives --set python /usr/bin/python3.8
|
||
changed_when: false
|
||
# - name: Fix repository URLs
|
||
# ansible.builtin.command:
|
||
# cmd: sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
|
||
# changed_when: false
|
||
|
||
# - name: Update baseurl
|
||
# ansible.builtin.command:
|
||
# cmd: sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
|
||
# changed_when: false
|
||
|
||
# - name: Install required packages
|
||
# ansible.builtin.yum:
|
||
# name:
|
||
# - epel-release
|
||
# - python3
|
||
# - python3-pip
|
||
# state: present
|