Last active
February 24, 2020 01:15
-
-
Save circa10a/6f91a7d399a581c687cddd642ba83988 to your computer and use it in GitHub Desktop.
example local ansible playbook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Configure files | |
hosts: 127.0.0.1 | |
connection: local | |
vars: | |
dirs: | |
dir1: ~/Desktop/dir1 | |
dir2: ~/Desktop/dir1 | |
tasks: | |
- name: whattomine_json | |
uri: | |
url: https://whattomine.com/coins.json | |
status_code: 200 | |
body_format: json | |
register: response | |
- name: ethereum_marketcap | |
debug: | |
msg: "{{ response.json.coins.Ethereum.market_cap }}" | |
- name: Creates test directory | |
file: | |
path: "{{ item }}" | |
state: directory | |
with_items: "{{ dirs }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment