From 92bd98c1d876077c4272f01dd45c442c73e63e52 Mon Sep 17 00:00:00 2001
From: Chris Hines <chris.hines@monash.edu>
Date: Fri, 20 Feb 2015 01:50:09 +0000
Subject: [PATCH] fix up etcHosts role so it can find the file makehosts.py

---
 {scripts => roles/etcHosts/files}/makehosts.py | 0
 roles/etcHosts/tasks/main.yml                  | 7 ++++++-
 2 files changed, 6 insertions(+), 1 deletion(-)
 rename {scripts => roles/etcHosts/files}/makehosts.py (100%)

diff --git a/scripts/makehosts.py b/roles/etcHosts/files/makehosts.py
similarity index 100%
rename from scripts/makehosts.py
rename to roles/etcHosts/files/makehosts.py
diff --git a/roles/etcHosts/tasks/main.yml b/roles/etcHosts/tasks/main.yml
index f527a58..9d8e8fe 100644
--- a/roles/etcHosts/tasks/main.yml
+++ b/roles/etcHosts/tasks/main.yml
@@ -3,8 +3,13 @@
   run_once: True
   delegate_to: 127.0.0.1
 
+- name: copy script
+  copy: src=makehosts.py dest=/tmp/makehosts.py mode=755
+  delegate_to: 127.0.0.1
+  run_once: True
+
 - name: make hosts data
-  command: ./scripts/makehosts.py /tmp/groups {{ domain }}
+  command: /tmp/makehosts.py /tmp/groups {{ domain }}
   delegate_to: 127.0.0.1
   run_once: True
   register: hosts_data
-- 
GitLab