Use domain name instead of IP in Ansible workflow

This commit is contained in:
Ryan Moon
2026-03-31 17:47:05 -05:00
parent 289f61bacb
commit e480bcc685

View File

@@ -56,12 +56,12 @@ jobs:
mkdir -p ~/.ssh
echo "${{ secrets.DROPLET_SSH_KEY }}" > ~/.ssh/do
chmod 600 ~/.ssh/do
ssh-keyscan -H $DROPLET_IP >> ~/.ssh/known_hosts
ssh-keyscan -H git-ssh.lunarfront.tech >> ~/.ssh/known_hosts
- name: Write inventory
run: |
echo "[infra]" > inventory.ini
echo "$DROPLET_IP ansible_user=root ansible_ssh_private_key_file=~/.ssh/do" >> inventory.ini
echo "git-ssh.lunarfront.tech ansible_user=root ansible_ssh_private_key_file=~/.ssh/do" >> inventory.ini
- name: Write vault password
run: echo "${{ secrets.ANSIBLE_VAULT_PASSWORD }}" > .vault_pass