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 bcf68e4
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,7 +32,21 @@
- 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 -i -E "centos.*8" /etc/centos-release; then
if ! command -v python3 &> /dev/null; then
dnf install -y python3
fi
fi
fi
tasks:
- name: Gather facts after Python installation
ansible.builtin.setup:

- name: Make tmp folder directory
file:
path: "{{ tmp_path }}"
Expand Down

0 comments on commit bcf68e4

Please sign in to comment.