Use domain name instead of IP in Ansible workflow
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user