Sign inSign up

r0h3/ssh_ansible

By r0h3

•Updated over 9 years ago

container for deployment usage in gitlab-ci

Image
0

846

r0h3/ssh_ansible repository overview

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⁠

Tag summary

Content type

Image

Digest

Size

213.5 MB

Last updated

over 9 years ago

docker pull r0h3/ssh_ansible