[PATCH 6/8] move geoip to a role

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 files/geoip/geoip_sync          |  2 --
 playbooks/groups/mirrorlist.yml |  2 +-
 roles/geoip/files/geoip_sync    |  2 ++
 roles/geoip/tasks/main.yml      | 13 +++++++++++++
 tasks/geoip.yml                 | 15 ---------------
 5 files changed, 16 insertions(+), 18 deletions(-)
 delete mode 100644 files/geoip/geoip_sync
 create mode 100644 roles/geoip/files/geoip_sync
 create mode 100644 roles/geoip/tasks/main.yml
 delete mode 100644 tasks/geoip.yml

diff --git a/files/geoip/geoip_sync b/files/geoip/geoip_sync
deleted file mode 100644
index 2c5ce79..0000000
--- a/files/geoip/geoip_sync
+++ /dev/null
@@ -1,2 +0,0 @@
-# cron job to sync the geoip data files
-0 1 4 * * root /usr/local/bin/syncFiles.sh bigfiles/geoip /usr/share/GeoIP
diff --git a/playbooks/groups/mirrorlist.yml b/playbooks/groups/mirrorlist.yml
index 8d5b2f8..08055b1 100644
--- a/playbooks/groups/mirrorlist.yml
+++ b/playbooks/groups/mirrorlist.yml
@@ -42,6 +42,7 @@
   - rkhunter
   - denyhosts
   - nagios_client
+  - geoip
 
   tasks:
   # this is how you include other task lists
@@ -56,7 +57,6 @@
   - include: $tasks/sudo.yml
   - include: $tasks/apache.yml
   - include: $tasks/mod_wsgi.yml
-  - include: $tasks/geoip.yml
   - include: $tasks/mirrorlist.yml
 
 
diff --git a/roles/geoip/files/geoip_sync b/roles/geoip/files/geoip_sync
new file mode 100644
index 0000000..2c5ce79
--- /dev/null
+++ b/roles/geoip/files/geoip_sync
@@ -0,0 +1,2 @@
+# cron job to sync the geoip data files
+0 1 4 * * root /usr/local/bin/syncFiles.sh bigfiles/geoip /usr/share/GeoIP
diff --git a/roles/geoip/tasks/main.yml b/roles/geoip/tasks/main.yml
new file mode 100644
index 0000000..da72a52
--- /dev/null
+++ b/roles/geoip/tasks/main.yml
@@ -0,0 +1,13 @@
+---
+# install python-geoIP
+- name: install python-GeoIP
+  yum: name=python-GeoIP state=installed
+  tags:
+  - packages
+
+- name: push over the geoip db once
+  copy: src=$item dest=/usr/share/GeoIP/
+  with_fileglob: $bigfiles/geoip/*.dat
+
+- name: geoip syncing script via cron
+  copy: src=geoip_sync dest=/etc/cron.d/geoip_sync mode=0644
diff --git a/tasks/geoip.yml b/tasks/geoip.yml
deleted file mode 100644
index d37a5d5..0000000
--- a/tasks/geoip.yml
+++ /dev/null
@@ -1,15 +0,0 @@
----
-# install python-geoIP
-- name: install python-GeoIP
-  yum: name=python-GeoIP state=installed
-  tags:
-  - packages
-
-- name: push over the geoip db once
-  copy: src=$item dest=/usr/share/GeoIP/
-  with_fileglob: $bigfiles/geoip/*.dat
-
-- name: geoip syncing script via cron
-  copy: src=$files/geoip/geoip_sync dest=/etc/cron.d/geoip_sync mode=0644
-
-
-- 
1.8.3.1

_______________________________________________
infrastructure mailing list
infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/infrastructure





[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux