From 69cf3cd23c6a374a9e6ca49d4d922f8421ce2400 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Mon, 18 Jan 2016 19:14:36 -0500 Subject: [PATCH] module is a variable, not a name prefix Turns out we want module.exit_json, not module_exit_json. Oops. Also, two other small ansible task cleanups found looking at the runs. Change-Id: I8737d5b1e675bfb89ee1db2f2c434c601d419f5e --- library/puppet_get_hiera_file_list | 2 +- tasks/main.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/library/puppet_get_hiera_file_list b/library/puppet_get_hiera_file_list index a4fbefb..531c9f4 100644 --- a/library/puppet_get_hiera_file_list +++ b/library/puppet_get_hiera_file_list @@ -62,7 +62,7 @@ def main(): if os.path.exists(full_path): good_paths.append(full_path) - module_exit_json(paths=good_paths) + module.exit_json(paths=good_paths) # import module snippets from ansible.module_utils.basic import * diff --git a/tasks/main.yml b/tasks/main.yml index 7043eaf..f4a4e58 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -7,7 +7,6 @@ owner: root group: root mode: 0700 - when: copy_hieradata is defined and copy_hieradata with_items: - fqdn - group @@ -26,12 +25,14 @@ dest: "{{ item }}" mode: 0600 with_items: hiera_file_paths.paths + when: hiera_file_paths is defined - name: ensure hieradata manifest link is present file: src: "{{ hieradata }}" dest: "{{ manifest_base }}/hieradata" state: link + when: manifest_base is defined when: copy_hieradata