Skip to content

Commit

Permalink
Updated install and remove packages task
Browse files Browse the repository at this point in the history
  • Loading branch information
c-bordon committed Sep 4, 2024
1 parent 616b709 commit 7aa4ea1
Showing 1 changed file with 36 additions and 35 deletions.
71 changes: 36 additions & 35 deletions .github/workflows/ansible_playbooks/ova_generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,30 @@
ova_path: '/var/provision/wazuh-virtual-machines'
wia_scripts: 'wazuh-installation-assistant'
wia_repository: 'https://github.com/wazuh/wazuh-installation-assistant/'
packages_to_uninstall:
- ec2-instance-connect
- amazon-ssm-agent
- ec2-hibinit-agent
- ec2-net-utils
- ec2-utils
- ec2-instance-connect
- aws-cfn-bootstrap
- ucpid
- amazon-linux-extras-yum-plugin
- dracut-config-ec2
- dracut-fips
- ec2-instance-connect-selinux
- grub2-efi-x64-ec2
- grub2-tools-efi
- grub2-tools-extra
- hibagent
- hmaccalc
packages_to_install:
- amazon-linux-onprem
- apr
- apr-util
- cpp
- gcc

tasks:
- name: Install git
Expand Down Expand Up @@ -48,6 +72,18 @@
async: 3600
poll: 10

- name: Install additional packages
yum:
name: "{{ item }}"
state: present
with_items: "{{ packages_to_install }}"

- name: Remove unneeded packages
yum:
name: "{{ item }}"
state: absent
with_items: "{{ packages_to_uninstall }}"

- name: Clean provision files
file:
path: /var/provision/
Expand Down Expand Up @@ -96,41 +132,6 @@
name: ec2-user
state: absent

- name: Remove ec2-instance-connect
yum:
name: ec2-instance-connect
state: absent

- name: Remove amazon-ssm-agent
yum:
name: amazon-ssm-agent
state: absent

- name: Remove ec2-hibinit-agent
yum:
name: ec2-hibinit-agent
state: absent

- name: Remove ec2-net-utils
yum:
name: ec2-net-utils
state: absent

- name: Remove ec2-utils
yum:
name: ec2-utils
state: absent

- name: Remove ec2-instance-connect
yum:
name: ec2-instance-connect
state: absent

- name: Remove aws-cfn-bootstrap
yum:
name: aws-cfn-bootstrap
state: absent

- name: Change ssh port to 22
replace:
path: /etc/ssh/sshd_config
Expand Down

0 comments on commit 7aa4ea1

Please sign in to comment.