Public Repository

Last pushed: 6 months ago
Short Description
container for deployment usage in gitlab-ci
Full Description

Add this to your .gitlab-ci.yml:

############################
deploy:
image: r0he/ssh_ansible
stage: deploy
before_script:

  • eval $(ssh-agent -s)
  • ssh-add <(echo "$SSH_PRIVATE_KEY")
  • mkdir -p ~/.ssh
  • '[[ -f /.dockerenv ]] && echo "$SSH_SERVER_HOSTKEYS" > ~/.ssh/known_hosts'
    script:
  • ansible-playbook -i ansible/inventory/example-prod/example.com ansible/playbooks/example.com.yml
    only:
  • master

##################################
for more info visit : https://docs.gitlab.com/ee/ci/ssh_keys/README.html

Docker Pull Command
Owner
r0h3

Comments (0)