Calc server is ADDITION ONLY calculator that is controlled by using REST-like API.
$ curl http://localhost:8080/?value=10
10 = 10
$ curl http://localhost:8080/?value=20
10 + 20 = 30
$ curl http://localhost:8080/
10 + 20 = 30
$ curl http://localhost:8080/?command=clear
0
See https://github.com/m-takahashi-if/ansible-collection-sample .
$ git clone https://github.com/m-takahashi-if/ansible-collection-demo.git
$ cd ansible-collection-demo
$ python3 calc-server.py
Run module demo as below.
$ ansible-playbook -i hosts.yml module-example-playbook.yml
To see the result, open web brower with http://localhost:8080/ .
Run role demo as below.
$ ansible-playbook -i hosts.yml role-example-playbook.yml
To see the result, open web brower with http://localhost:8080/ .