Changed "netflows" role to be consistent with role setup.

Also, main.yaml in root is example of how to "call" roles
This commit is contained in:
Pi
2019-02-21 12:08:09 -05:00
parent 2d915c81ff
commit cfdfab54ad
7 changed files with 28 additions and 24 deletions

0
ansible.cfg Normal file → Executable file
View File

0
hosts Normal file → Executable file
View File

1
main.retry Normal file
View File

@@ -0,0 +1 @@
192.168.50.2

5
main.yaml Normal file
View File

@@ -0,0 +1,5 @@
---
- hosts: netflows
become: true
roles:
- netflows

0
roles/netflows/tasks/main.retry Normal file → Executable file
View File

46
roles/netflows/tasks/main.yaml Normal file → Executable file
View File

@@ -1,25 +1,23 @@
---
- hosts: netflows
tasks:
- name: Install fprobe Package
become: yes
apt:
name: ['fprobe']
state: present
update_cache: true
tags: install_fprobe
- lineinfile:
path: /etc/default/fprobe
state: present
backrefs: yes
regexp: '^FLOW_COLLECTOR="localhost:555"'
line: 'FLOW_COLLECTOR="192.168.200.247:9995"'
become: true
- name: enable fprobe service and ensure it is not masked
systemd:
name: fprobe
enabled: yes
masked: no
state: restarted
tags: enable_fprobe
become: true
- name: Install fprobe Package
become: yes
apt:
name: ['fprobe']
state: present
update_cache: true
tags: install_fprobe
- lineinfile:
path: /etc/default/fprobe
state: present
backrefs: yes
regexp: '^FLOW_COLLECTOR="localhost:555"'
line: 'FLOW_COLLECTOR="192.168.200.247:9995"'
become: true
- name: enable fprobe service and ensure it is not masked
systemd:
name: fprobe
enabled: yes
masked: no
state: restarted
tags: enable_fprobe
become: true

0
roles/public/tasks/main.yaml Normal file → Executable file
View File