Skip to content

Commit

Permalink
Adding Python install in CentOS 8
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcr01 committed Aug 29, 2024
1 parent 08b193e commit f5a0c08
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/ansible-playbooks/provision.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
- hosts: all
become: true
gather_facts: no
vars:
script_path: "{{ tmp_path }}"
script_name: "wazuh-install.sh"
Expand Down Expand Up @@ -31,6 +32,20 @@
- beautifulsoup4
- urllib3==1.26.6

pre_tasks:
- name: Check if the system is CentOS 8 and install Python if necessary
raw: |
if [ -f /etc/centos-release ]; then
if grep -q "CentOS Linux release 8" /etc/centos-release; then
if ! command -v python3 &> /dev/null; then
dnf install -y python3
fi
fi
fi
- name: Gather facts after Python installation
ansible.builtin.setup:

tasks:
- name: Make tmp folder directory
file:
Expand Down

0 comments on commit f5a0c08

Please sign in to comment.