Add SSH key passphrase
This commit is contained in:
parent
8a0cec92de
commit
268411136b
@ -1,2 +1,2 @@
|
|||||||
[host]
|
[host]
|
||||||
{{ DEPLOYMENT_USER }}@{{ DEPLOY_HOSTNAME }} ansible_connection=ssh ansible_user={{ DEPLOYMENT_USER }}
|
{{ DEPLOYMENT_USER }}@{{ DEPLOY_HOSTNAME }} ansible_connection=ssh ansible_user={{ DEPLOYMENT_USER }} ansible_ssh_pass={{ DEPLOYMENT_SSH_KEY_PASSPHRASE }}
|
@ -23,10 +23,13 @@ steps:
|
|||||||
from_secret: spt_items_hostname
|
from_secret: spt_items_hostname
|
||||||
DEPLOYMENT_USER:
|
DEPLOYMENT_USER:
|
||||||
from_secret: deploy_username
|
from_secret: deploy_username
|
||||||
|
DEPLOYMENT_SSH_KEY_PASSPHRASE:
|
||||||
|
from_secret: deploy_ssh_key_passphrase
|
||||||
commands:
|
commands:
|
||||||
- sed -i 's/{{ SPT_ITEMS_HOSTNAME }}/'"$SPT_ITEMS_HOSTNAME"'/g' ./items/frontend/.env.example
|
- sed -i 's/{{ SPT_ITEMS_HOSTNAME }}/'"$SPT_ITEMS_HOSTNAME"'/g' ./items/frontend/.env.example
|
||||||
- mv ./items/frontend/.env.example ./items/frontend/.env
|
- mv ./items/frontend/.env.example ./items/frontend/.env
|
||||||
- sed -i 's/{{ DEPLOY_HOSTNAME }}/'"$DEPLOY_HOSTNAME"'/g' ./.ansible-items/inventory
|
- sed -i 's/{{ DEPLOY_HOSTNAME }}/'"$DEPLOY_HOSTNAME"'/g' ./.ansible-items/inventory
|
||||||
|
- sed -i 's/{{ DEPLOYMENT_SSH_KEY_PASSPHRASE }}/'"$DEPLOYMENT_SSH_KEY_PASSPHRASE"'/g' ./.ansible-items/inventory
|
||||||
- sed -i 's/{{ DEPLOYMENT_USER }}/'"$DEPLOYMENT_USER"'/g' ./.ansible-items/inventory
|
- sed -i 's/{{ DEPLOYMENT_USER }}/'"$DEPLOYMENT_USER"'/g' ./.ansible-items/inventory
|
||||||
|
|
||||||
- name: build frontend
|
- name: build frontend
|
||||||
@ -42,7 +45,7 @@ steps:
|
|||||||
- rm ./items/api/public/index.html
|
- rm ./items/api/public/index.html
|
||||||
|
|
||||||
- name: check ansible syntax
|
- name: check ansible syntax
|
||||||
image: shirito/drone-ansible:1.0.0
|
image: plugins/ansible:3
|
||||||
settings:
|
settings:
|
||||||
playbook: ./.ansible-items/playbook.yml
|
playbook: ./.ansible-items/playbook.yml
|
||||||
inventory: ./.ansible-items/inventory
|
inventory: ./.ansible-items/inventory
|
||||||
@ -53,15 +56,13 @@ steps:
|
|||||||
- development
|
- development
|
||||||
|
|
||||||
- name: apply ansible playbook
|
- name: apply ansible playbook
|
||||||
image: shirito/drone-ansible:1.0.0
|
image: plugins/ansible:3
|
||||||
settings:
|
settings:
|
||||||
playbook: ./.ansible-items/playbook.yml
|
playbook: ./.ansible-items/playbook.yml
|
||||||
inventory: ./.ansible-items/inventory
|
inventory: ./.ansible-items/inventory
|
||||||
galaxy: ./.ansible-items/requirements.yml
|
galaxy: ./.ansible-items/requirements.yml
|
||||||
private_key:
|
private_key:
|
||||||
from_secret: deploy_ssh_key
|
from_secret: deploy_ssh_key
|
||||||
private-key-passphrase:
|
|
||||||
from_secret: deploy_ssh_key_password
|
|
||||||
environment:
|
environment:
|
||||||
DEPLOY_HOSTNAME:
|
DEPLOY_HOSTNAME:
|
||||||
from_secret: deploy_hostname
|
from_secret: deploy_hostname
|
||||||
|
Loading…
x
Reference in New Issue
Block a user