Generalizing GeoIP to be consumed by more services
This commit is contained in:
22
roles/GeoIP/tasks/main.yml
Normal file
22
roles/GeoIP/tasks/main.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
|
||||
- name: Install components
|
||||
become: yes
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
loop:
|
||||
- geoip
|
||||
- geoip-database
|
||||
- geoip-database-extra
|
||||
- libmaxminddb
|
||||
|
||||
# This is a hack while geoip-database only provides the legacy version.
|
||||
- name: Ensure GeoIP2 database is present
|
||||
become: yes
|
||||
file:
|
||||
path: /usr/share/GeoIP/GeoIP2.mmdb
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
state: file
|
||||
Reference in New Issue
Block a user