Ansible Contributor Summit, Ghent 2025
This public HackMD is to allow everybody to make notes during Contributor Summit on Wednesday 5th Feb which takes places as part of Configuration Managemenent Camp in Ghent.
Useful links:
Warm up discussion
Kirill is leading a follow up discussion about his functional programming talk from yesterday.
Suggestion from Felix: maybe we should add an action plugin 'evaluate' that evalutes an expression and allows you to register the result and use that, instead of returning ansible_facts
(like set_facts
). then you can add an evaluate task, evaluate all expressions there (optionally with run_once: true
) to get the values evaluated at this point in time, register the result, and then use the result in vars:
Kirill's talk on SOLID principles from DevConf:
Actions
Morning sessions
During the morning, we will have several brief sessions from speakers on a range of topics.
Website: ansiblepilot.com
YouTube channel: BertonLuca
GitHub: lucab85
Published books: Luca Berton on leanpub
- started with one YouTube video
- created more content but keeping it short. Noticed lots of other Ansible content on YouTube was 2 hours plus.
- topics shared: getting started, particular focus on Windows systems because Luca noticed there were lots of searches and questions
- began to get lots of positive feedback and made lots of human connections through technology
- started creating books to share knowledge and has now published 5 books based on Ansible, practical guides for interacting with Ansible
- advice is to work not only on professional skills but personal branding that demonstrates abilities
Actions
- Helping our international communities
- Ensure awesome-ansible & the Forum's internation communities link to Luca's non-English content
- Add in a pinned-post in each language that has links to resources in the native language
- Consider which countries don't have as many English speakers (such as Italy) and countries with very different languages (Chinese & Japanese)
Anwesha Das: How to Become an Ansible contributor
- Anwesha's background was in criminal law, which took her into the world of Property Law.
- has learned by being hands on in open-source communities
- Why contribute? Provides an opportunity for learning for free and gives you the chance to network. Contributing is a means to help you "build your personal brand". Anwesha has worked with PyLadies and is a fellow at the Python Software Foundation, which has helped her establish professional credentials.
- PyLadiesCon keynote
- EuroPython 2024
- Collections are a way to distribute Ansible content. Key collections like
ansible.builtin
plus many community collections you can contribute too.
- How can I help? in the Ansible documentation provides information about contributing to collections as well as links to easy fix and good first issues across the community projects.
- Andrei's How to submit your first contribution post in the forum is another great resource to get started.
Martin Krizek: Ansible core architecture: Handlers
GitHub profile: https://github.com/mkrizek
- Handler is a special kind of task that is executed when notified by a changed task.
- Use the
notify:
or listen:
keywords to notify handlers.
- You can notify topics to trigger multiple handlers.
- Handlers without name or topic are useless.
- To avoid overwriting handlers, it is important to name them uniquely.
- The
flush_handlers
meta task triggers handlers but is added implicitly by the core engine although you can use flush_handlers
explicitly.
- If a play fails, the notified handlers are not executed but you can override that at the play level or cli option with
force_handlers: true
- To define handlers within roles, you can put them within the
handlers
directory of the role. The "role_name: handler_name"
syntax is a special way to notify handlers within roles.
- Handlers run in the order they are defined in the play, not in the order they are notified.
- You can use
include_tasks
and import_tasks
as handlers. include_tasks
are handled at runtime while import_tasks
are handled at parse time.
- "
include_tasks
is a handler, import_tasks
creates handlers"
- You can chain handlers - handlers can notify other handlers
- Limitations for handlers are available in the handler docs
- Beware of templates in handler names!
- ansible-core 2.14 and later - handlers are handled as regular tasks and follow the same code flow using the
PlayIterator
state machine
- read the porting guides in documentation!
Q: Is it possible to reference a handler from another role inside a role?
A: Yes. Although this creates a dependency within roles, which is not best practice.
Q: Who uses a custom strategy plugin?
A: 2 people use them occasionally
Q: Who reads the anisble-core porting guides
A: Only ~5 people
Q: Who knows what a meta task is?
A: ~20%
Q: Recommendations about running handlers in roles? Should you flush handlers in the role explicitly?
A: Just run flush handlers if you need them executed. - Add a variable to allow users to turn on / off the handler depending on the use case. Users need to decide.
Q: Handlers executed in the sequence they are declared. If we call external handlers, in which sequence will they be executed?
A: Cannot notify handlers in roles that are not in the play. Roles must be included in the play.
Notes
Notes
- Community.general was created with the "left overs" that didn't have a dedicated home after the the big move into Collections
- We have managed to spin out some content into dedicated repos.
- Though we've ended up with a repo that doesn't have any active maintainers
Q: Who uses community.general
A: 90%+
Felix asks help and offers help with issues and pull requests.
David M. Simard: Recording Ansible benchmarking
Slides from last year's presentation about the prometheus implementation
Details moved to forum post (draft).
- Project ideas for Ansible hands on.
- Does a mentorship program help?
- Are you interested to be a mentor?
- How to built a pipeline to have a solid flow of contributors to the project
Is there any areas your project needs help with?
- Do you need contributors to give you a hand on your project?
- Consider enroll your project in the "Buddy Up" section here.
Buddy Up
Buddy up with @gundalow to translate Ansible content/docs into different languages.
Release Management
Buddy up with Anwesha for the release management of Ansible Community Package.
Buddy up with Felix for cleaning up community.general