Skip to content

Commit

Permalink
Fix ansible inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
Enaraque committed Aug 28, 2024
1 parent bca3d62 commit 3c379bc
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/packages_builder_ami.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
--label-team devops --label-termination-date 1d
sed 's/: */=/g' /tmp/allocatorvm_ami/inventory.yml > /tmp/allocatorvm_ami/inventory_mod.yml
sed -n 's/^identifier: \(.*\)$/identifier=\1/p' /tmp/allocatorvm_ami/track.yml >> /tmp/allocatorvm_ami/inventory_mod.yml
source /tmp/allocatorvm_ova/inventory_mod.yml
echo "::add-mask::$ansible_host"
echo "::add-mask::$ansible_port"
echo "::add-mask::$ansible_user"
Expand All @@ -85,11 +86,12 @@ jobs:
- name: Generate inventory
run: |
echo "[gha_instance]" > tmp/allocatorvm_ami/inventory_ansible.ini
echo "$ansible_host ansible_port=$ansible_port >> tmp/allocatorvm_ami/inventory_ansible.ini
echo ansible_user=$ansible_user >> tmp/allocatorvm_ami/inventory_ansible.ini
echo ansible_ssh_private_key_file=$ansible_ssh_private_key_file >> tmp/allocatorvm_ami/inventory_ansible.ini
echo ansible_ssh_common_args='$ansible_ssh_common_args'" >> tmp/allocatorvm_ami/inventory_ansible.ini
echo "[gha_instance]" > /tmp/allocatorvm_ami/inventory_ansible.ini
echo "ansible_host=${{ env.ansible_host }}" >> /tmp/allocatorvm_ami/inventory_ansible.ini
echo "ansible_port=${{ env.ansible_port }}" >> /tmp/allocatorvm_ami/inventory_ansible.ini
echo "ansible_user=${{ env.ansible_user }}" >> /tmp/allocatorvm_ami/inventory_ansible.ini
echo "ansible_ssh_private_key_file=${{ env.ansible_ssh_private_key_file }}" >> /tmp/allocatorvm_ami/inventory_ansible.ini
echo "ansible_ssh_common_args='${{ env.ansible_ssh_common_args }}'" >> /tmp/allocatorvm_ami/inventory_ansible.ini
- name: Checkout wazuh/wazuh-virtual-machines repository
uses: actions/checkout@v4
Expand Down

0 comments on commit 3c379bc

Please sign in to comment.