Skip to content

Commit

Permalink
changed SSH port of the AMI instance
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosALgit committed Oct 11, 2024
1 parent 111654f commit e8d5421
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/packages_builder_ami.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ jobs:
echo "[gha_instance]" > ${{ env.ALLOCATOR_PATH }}/inventory_ansible.ini
echo "${{ env.ansible_host }} ansible_port=${{ env.ansible_port }} ansible_user=${{ env.ansible_user }} ansible_ssh_private_key_file=${{ env.ansible_ssh_private_key_file }} ansible_ssh_common_args='${{ env.ansible_ssh_common_args }}'" >> ${{ env.ALLOCATOR_PATH }}/inventory_ansible.ini
- name: Change SSH port
run: |
ssh -i "${{ env.ansible_ssh_private_key_file }}" -o StrictHostKeyChecking=no -p ${{ env.ansible_port }} ${{ env.ansible_user }}@${{ env.ansible_host }} << 'EOF'
sudo sed -i 's/^Port 2200/Port 22/' /etc/ssh/sshd_config
sudo systemctl restart sshd
EOF
- name: Run Ansible playbook to install Wazuh components
run: |
Expand Down
2 changes: 1 addition & 1 deletion ami/playbooks/build_ami_packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
with_items:
- updateIndexerHeap

- name: Clone the wazuh-packages repository
- name: Clone the wazuh-installation-assistant repository
git:
repo: "https://github.com/wazuh/wazuh-installation-assistant.git"
version: "{{ installation_assistant_reference }}"
Expand Down

0 comments on commit e8d5421

Please sign in to comment.