Skip to content

beeankha/CustomAnsibleModules

Repository files navigation

Custom Ansible Modules

Some custom modules I've written to expand my use of Ansible.

Module Descriptions

library/sum_two_module.py

Adds two numbers together.

library/sum_module.py

Adds a list of numbers together.

library/dice_module.py

The worst BEST way ever to roll dice! 😁

Customize the number of sides you want your die to have (defaults to 20), as well as the number of times you want to roll it (defaults to 1).

library/hn_top_stories.py

Gather data on the top N number of stories on Hacker News.

Select the number of top stories via the number_of_entries parameter. Optional outputs include story_id, author, and comments (the number of comments the article has). Output is sorted by upvotes, with most upvoted at the top.

Based on this Python script

A more in-depth example of this module can be found here.

NOTE: This module requires requests.


How to Use

A practice playbook is provided in this repo (practice_playbook.yml).

Clone/download these files locally, then use your terminal to cd into the Custom_Ansible_Modules directory. Once there, run:

ansible-playbook practice_playbook.yml

...and that's it! If everything is working correctly, then output like what's shown below should appear on your terminal:

Playbook Output

About

Some custom Ansible modules I've written

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages