config-nameservers/.gitlab-ci.yml

18 lines
518 B
YAML

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 -
- mkdir -p /root/.ssh
- chmod 700 /root/.ssh
- echo "$SSH_KNOWN_HOSTS" >> /root/.ssh/known_hosts
- chmod 644 /root/.ssh/known_hosts
deploy:
script:
# TODO: build image with dependencies installed
- ansible-galaxy collection install ansible.netcommon
- pip3 install netaddr
- ansible-playbook -i config/hosts config/deploy.yml