Skip to content

Instantly share code, notes, and snippets.

@circa10a
Last active February 24, 2020 01:15
Show Gist options
  • Save circa10a/6f91a7d399a581c687cddd642ba83988 to your computer and use it in GitHub Desktop.
Save circa10a/6f91a7d399a581c687cddd642ba83988 to your computer and use it in GitHub Desktop.
example local ansible playbook
---
- 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