Compare commits

...

17 Commits

Author SHA1 Message Date
6377a24219 Merge pull request 'updates to .drone.yml' (#7) from development into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #7
2023-11-17 15:58:08 -05:00
185d47b0e4 update .ansible-lint to allow for colon tidiness
All checks were successful
continuous-integration/drone/push Build is passing
2023-11-17 15:54:12 -05:00
31b7fe0acc remove debug; fix globals
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-17 15:53:13 -05:00
59bfbf0c2b trying stuff
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-17 15:50:29 -05:00
3a260ac16b reorder and rename
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-11-17 15:45:35 -05:00
cbbeaa4af9 add globals
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-11-17 15:44:33 -05:00
d49c00ceb5 re-add image to test
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-11-17 15:41:56 -05:00
2321723c09 syntax changes
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-11-17 15:41:15 -05:00
7a60623201 fix L#15 mapping values are not allowed in this context
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-11-17 15:40:49 -05:00
c689cd19bd add content to echo
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-11-17 15:40:00 -05:00
af2c35003c add debug test to check environment
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-11-17 15:35:53 -05:00
2ed92a0eda fix hello.yml; .drone-ci.yml refinements
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-11-17 15:34:20 -05:00
3a02d1d9bd remove syntax check as ansible-lint already does this; see: https://ansible.readthedocs.io/projects/lint/rules/syntax-check/
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-17 15:26:42 -05:00
c6c3bf23d7 create syntax error for testing
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-17 15:19:31 -05:00
8186d8d4ae re-order tests
All checks were successful
continuous-integration/drone/push Build is passing
2023-11-17 15:17:45 -05:00
c3d223f289 remove empty line
All checks were successful
continuous-integration/drone/push Build is passing
2023-11-17 12:19:13 -05:00
c0e107641f update .drone.yml
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-17 12:13:40 -05:00
3 changed files with 42 additions and 45 deletions

View File

@ -1,2 +1,3 @@
skip_list: skip_list:
- yaml[line-length] - yaml[line-length]
- yaml[colons]

View File

@ -1,12 +1,24 @@
--- ---
name: Ansible Playbook Lint and Test Execution global-variables:
ansible_image: &ansible_image "gitea.thezengarden.net/podman/images/ansible-dev:latest"
ansible_inventory: &ansible_inventory "-i 127.0.0.1, --connection=local"
ansible_playbook: &ansible_playbook "hello.yml"
name: run_ansible_tests
kind: pipeline kind: pipeline
type: docker type: docker
environment:
ANSIBLE_INVENTORY : *ansible_inventory
ANSIBLE_PLAYBOOK : *ansible_playbook
ANSIBLE_DOCKER_IMAGE : *ansible_image
steps: steps:
- name: "Verify environment" - name: "ansible_environment_verify"
image: gitea.thezengarden.net/podman/images/ansible-dev:latest image: *ansible_image
commands: commands:
- git log -1 - git log -1
- ansible --version - ansible --version
@ -17,50 +29,34 @@ steps:
event: [push] event: [push]
- name: "ansible_galaxy_requirements"
############################################################################### image: *ansible_image
############################################################################### commands:
############################################################################### - ansible-galaxy install -r $DRONE_WORKSPACE/requirements.yml
when:
branch:
- development
event: [push]
# - name: "Ansible-Galaxy: Install from requirements.yml" - name: "ansible_lint"
# image: gitea.thezengarden.net/podman/images/ansible-dev:latest image: *ansible_image
# commands: commands:
# - ansible-galaxy install -r $DRONE_WORKSPACE/requirements.yml - ansible-lint --offline $DRONE_WORKSPACE
# when: when:
# branch: branch:
# - development - development
# event: event: [push]
# exclude:
# - pull_request
# - name: "Syntax check and Ansible Lint" - name: "ansible_playbook_execution"
# image: gitea.thezengarden.net/podman/images/ansible-dev:latest image: *ansible_image
# commands: commands:
# - ansible-lint --offline $DRONE_WORKSPACE - ansible-playbook -v $ANSIBLE_INVENTORY $DRONE_WORKSPACE/$ANSIBLE_PLAYBOOK
# - ansible-playbook --syntax-check $DRONE_WORKSPACE/hello.yml when:
# when: branch:
# branch: - development
# - development event: [push]
# event:
# exclude:
# - pull_request
# - name: "Test playbook execution"
# image: gitea.thezengarden.net/podman/images/ansible-dev:latest
# environment:
# ANSIBLE_INVENTORY:
# from_secret: ansible_inventory
# commands:
# - ansible-playbook -v -i 127.0.0.1, --connection=local $DRONE_WORKSPACE/hello.yml
# when:
# branch:
# - development
# event:
# exclude:
# - pull_request
############################################################################### ###############################################################################

View File

@ -1,9 +1,9 @@
- name: Hello world - name: Hello world
hosts: localhost hosts: all
connection: local
become: false become: false
gather_facts: false gather_facts: false
tasks: tasks:
- name: Say Hello world - name: Say Hello world
ansible.builtin.debug: ansible.builtin.debug: