dns-witch-zones/.gitlab-ci.yml

18 lines
518 B
YAML
Raw Normal View History

2021-06-07 16:24:09 +00:00
image: ansible/ansible-runner
before_script:
# from https://docs.gitlab.com/ee/ci/ssh_keys/
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
2021-06-07 16:43:00 +00:00
- mkdir -p /root/.ssh
- chmod 700 /root/.ssh
2021-06-07 16:37:40 +00:00
- echo "$SSH_KNOWN_HOSTS" >> /root/.ssh/known_hosts
2021-06-07 16:43:00 +00:00
- chmod 644 /root/.ssh/known_hosts
2021-06-07 16:26:02 +00:00
2021-06-07 16:44:28 +00:00
deploy:
2021-06-07 16:26:02 +00:00
script:
2021-06-07 16:55:20 +00:00
# TODO: build image with dependencies installed
2021-06-07 16:46:43 +00:00
- ansible-galaxy collection install ansible.netcommon
2021-06-07 16:48:38 +00:00
- pip3 install netaddr
2021-06-07 16:44:28 +00:00
- ansible-playbook -i config/hosts config/deploy.yml