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
This uses CD workflow with below steps
- Checkout: Checksout the repository
- Show deployment files: Shows the list of changed ansible playbook yaml files. This uses tj-actions.
- Deploy: Executes the changed ansible playbook yaml files. This uses playbook execution with ansible CLI. This also uses the Inventory config (hosts) defined in deploy/hosts
- Commit and push the facts file: Commits and push the added/updated fact output file to current codebase. Uses git commands and ad-m/github-push-action
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