From 9b4f89ab8036189bd14b13f3227e987221a3fd83 Mon Sep 17 00:00:00 2001 From: mpavlov Date: Thu, 26 Sep 2024 21:34:59 +0300 Subject: [PATCH] added rhel support --- ansible.cfg | 6 ------ roles/rproxy/tasks/main.yml | 22 +++++++++++++++------- 2 files changed, 15 insertions(+), 13 deletions(-) delete mode 100644 ansible.cfg diff --git a/ansible.cfg b/ansible.cfg deleted file mode 100644 index a1ca649..0000000 --- a/ansible.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[defaults] -hostfile = hosts.ini -log_path = ansible-log.log -host_key_checking = false -interpreter_python = /usr/bin/python3 -forks = 30 diff --git a/roles/rproxy/tasks/main.yml b/roles/rproxy/tasks/main.yml index 8d0fe8e..42127c9 100644 --- a/roles/rproxy/tasks/main.yml +++ b/roles/rproxy/tasks/main.yml @@ -7,15 +7,23 @@ - install - add_config +- name: Install dependencies (Debian) + ansible.builtin.apt: + name: + - docker.io + - docker-compose + update_cache: yes + when: ansible_facts['os_family'] == "Debian" + +- name: Install dependencies (RHEL) + ansible.builtin.pip: + name: + - docker + - docker-compose + when: ansible_facts['os_family'] == "RedHat" + - name: Install rproxy block: - - name: Install dependencies - ansible.builtin.apt: - name: - - docker.io - - docker-compose - update_cache: yes - - name: Remove rproxy dir ansible.builtin.file: path: "{{ rproxy_dir }}"