Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/ansible_monitoring.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Add host to known_hosts
run: |
mkdir -p /home/runner/.ssh
touch /home/runner/.ssh/known_hosts
echo "${{ secrets.SSH_PUBLIC_KEY }}" > /home/runner/.ssh/id_rsa.pub
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /home/runner/.ssh/id_rsa
chmod 600 /home/runner/.ssh/id_rsa
chmod 644 /home/runner/.ssh/id_rsa.pub
ssh-keyscan deltronfr.mooo.com >> /home/runner/.ssh/known_hosts

- name: Install Ansible
shell: bash
run: |
Expand All @@ -35,7 +44,7 @@ jobs:
run: |
echo "[web_servers]" > infrastructure/ansible/inventory.ini
echo "deltronfr.mooo.com" >> infrastructure/ansible/inventory.ini

- name: Run Ansible playbook
run: |
cd infrastructure/ansible
Expand Down