kind: pipeline type: docker name: ansible steps: - name: setup environment image: ubuntu environment: SSH_USER: from_secret: SSH_USER commands: - echo "$SSH_KEY" > $PWD/id_rsa && chmod 0600 $PWD/id_rsa - name: check ansible syntax image: plugins/ansible:3 settings: playbook: nightly.yaml galaxy: requirements.yaml inventory: inventory.yaml syntax_check: true - name: run playbook in check mode image: plugins/ansible:3 environment: ANSIBLE_HOST_KEY_CHECKING: "False" ANSIBLE_PRIVATE_KEY_FILE: "/drone/src/id_rsa" settings: playbook: nightly.yaml galaxy: requirements.yaml inventory: inventory.yaml check: true - name: ansible nightly run image: plugins/ansible:3 environment: ANSIBLE_HOST_KEY_CHECKING: "False" ANSIBLE_PRIVATE_KEY_FILE: "/drone/src/id_rsa" settings: playbook: nightly.yaml galaxy: requirements.yaml inventory: inventory.yaml