Skip to content

Latest commit

 

History

History
20 lines (17 loc) · 2.59 KB

File metadata and controls

20 lines (17 loc) · 2.59 KB

Ansible sample with workflow

CI Workflow

This uses CI workflow with below steps

  • Checkout: Checksout the repository
  • Show changed files: Shows the list of changed ansible playbook yaml files. This uses tj-actions.
  • Show diff of changed files: Shows file diffs for changed ansible playbook yaml files. This uses git diff.
  • Lint ansible files: Lints the changed ansible playbook yaml files using ansible-lint-action. This uses Lint config defined in .config/ansible-lint
  • Dry-run: Dryrun the changed ansible playbook yaml files. This uses check/dryrun mode with ansible CLI. This also uses the Inventory config (hosts) defined in deploy/hosts

CD Workflow

This uses CD workflow with below steps

Note: Each playbook should have facts collection tasks and the task to save the output to file in ./snapshots/ folder. The output file name should be host name of the platy book run. For example ./snapshots/csr1000v-1