https://github.com/tleguern/ansible-playbook-mastermind
Play the game of Mastermind in Ansible
https://github.com/tleguern/ansible-playbook-mastermind
ansible ansible-game ansible-playbook game mastermind
Last synced: 3 months ago
JSON representation
Play the game of Mastermind in Ansible
- Host: GitHub
- URL: https://github.com/tleguern/ansible-playbook-mastermind
- Owner: tleguern
- License: isc
- Created: 2021-04-27T12:02:25.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-31T17:15:04.000Z (over 3 years ago)
- Last Synced: 2025-03-17T00:34:05.142Z (3 months ago)
- Topics: ansible, ansible-game, ansible-playbook, game, mastermind
- Homepage:
- Size: 21.5 KB
- Stars: 13
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ansible Playbook: Mastermind
This project is attempt to bring the board game of of [Mastermind](https://en.wikipedia.org/wiki/Mastermind_(board_game)) (although a bit mixed with [Bulls and Cows](https://en.wikipedia.org/wiki/Bulls_and_Cows)) to Ansible.
The goal is to find a secret combination of four coloured pegs in a given number of turns (here twelve) by submitting guesses and analysing the answers.
The game will display the result as a number of “bulls” (number of correctly guessed colours and positions) or “cows” (number of correctly guessed colours but incorrect positions).At the end of each turn a summary of past guesses is displayed like this:
```
TASK [debug] *******************************************************************
ok: [localhost] =>
msg: |-
Turn 1: | red | red | red | red |
Turn 2: | red | blue | blue | blue |
Turn 3: | red | blue | blue | black |
Turn 4: | red | blue | black | blue |
----
4 bulls and 0 cows
```## How to play
The following packages are necessary:
- ansible
Simply run the following command:
```sh
$ ansible-playbook mastermind.yml
...
```Here is an asciicast recording:
[](https://asciinema.org/a/459335)
## License
ISC
## Contributing
Either send [send GitHub pull requests](https://github.com/tleguern/ansible-playbook-mastermind) or [send patches on SourceHut](https://lists.sr.ht/~tleguern/misc).
## Author Information
Tristan Le Guern