stages: # List of stages for jobs, and their order of execution - test - deploy lint-test-job: stage: test image: pipelinecomponents/ansible-lint script: - ansible-lint -p lamp.yml | ansible-lint-junit -o ansible-lint.xml || true artifacts: when: always reports: junit: ansible-lint.xml deploy-job: stage: deploy image: ansible before_script: - mkdir -p ~/.ssh - ssh-keyscan ansible-debian.xlinfo.lan > ~/.ssh/known_hosts - ssh-keyscan ansible-rocky.xlinfo.lan >> ~/.ssh/known_hosts - echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - chmod 700 ~/.ssh/ script: - ansible-playbook lamp.yml -i hosts