/ansible-collection-devops

Collection of devops for Ansible

Primary LanguageJinja

DevOps Collection for Ansible

这个Collection包括:

Usage

Install this collection locally:

ansible-galaxy collection install clay_wangzhi.devops

Then you can use the roles from the collection in your playbooks:

---
- hosts: test

  collections:
    - clay_wangzhi.devops

  roles:
    - sysinit

If you want to be more explicit, you can use the fully-qualified role name when referring to a role in this collection, like clay_wangzhi.devops.sysinit instead of just sysinit. This could be helpful if, for example, you maintain a separate sysinit role in another place on your local workstation.

---
- hosts: test

  roles:
    - clay_wangzhi.devops.sysinit

Pushing a new version

Before tagging a new version, make sure all the git submodules are up to date:

git submodule update --recursive --remote

Then commit and push all changes, and make sure all tests are passing.

Then tag the new version of the collection and push the tag.

Once pushed, if tests pass, Travis CI will deploy the new collection version using the playbook in scripts/deploy.yml. That directory also contains the galaxy.yml template that will be used to build the collection metadata.

Author

This collection was created in 2021 by Clay.