Created
November 5, 2016 13:48
-
-
Save trondhindenes/44891cadf8c96555ee9a75bd60929e55 to your computer and use it in GitHub Desktop.
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: Set intermediate fact | |
set_fact: | |
vars_hack: "{{ hostvars[inventory_hostname] }}" | |
- name: remove temp folder | |
file: | |
path: "/tmp/ansiblecmdb" | |
state: absent | |
failed_when: false | |
delegate_to: localhost | |
- name: create temp folder | |
file: | |
path: "/tmp/ansiblecmdb" | |
state: directory | |
delegate_to: localhost | |
- name: Dump all vars | |
action: template src=templates/dumpall.j2 dest="/tmp/ansiblecmdb/{{ inventory_hostname }}.json" | |
delegate_to: localhost | |
- name: add to db | |
hosts: localhost | |
tasks: | |
- name: add to db | |
script: app.py | |
delegate_to: localhost |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment