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:
0
ansible.cfg
Normal file → Executable file
0
ansible.cfg
Normal file → Executable file
1
main.retry
Normal file
1
main.retry
Normal file
@@ -0,0 +1 @@
|
|||||||
|
192.168.50.2
|
||||||
5
main.yaml
Normal file
5
main.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- hosts: netflows
|
||||||
|
become: true
|
||||||
|
roles:
|
||||||
|
- netflows
|
||||||
0
roles/netflows/tasks/main.retry
Normal file → Executable file
0
roles/netflows/tasks/main.retry
Normal file → Executable file
8
roles/netflows/tasks/main.yaml
Normal file → Executable file
8
roles/netflows/tasks/main.yaml
Normal file → Executable file
@@ -1,21 +1,19 @@
|
|||||||
---
|
---
|
||||||
- hosts: netflows
|
- name: Install fprobe Package
|
||||||
tasks:
|
|
||||||
- name: Install fprobe Package
|
|
||||||
become: yes
|
become: yes
|
||||||
apt:
|
apt:
|
||||||
name: ['fprobe']
|
name: ['fprobe']
|
||||||
state: present
|
state: present
|
||||||
update_cache: true
|
update_cache: true
|
||||||
tags: install_fprobe
|
tags: install_fprobe
|
||||||
- lineinfile:
|
- lineinfile:
|
||||||
path: /etc/default/fprobe
|
path: /etc/default/fprobe
|
||||||
state: present
|
state: present
|
||||||
backrefs: yes
|
backrefs: yes
|
||||||
regexp: '^FLOW_COLLECTOR="localhost:555"'
|
regexp: '^FLOW_COLLECTOR="localhost:555"'
|
||||||
line: 'FLOW_COLLECTOR="192.168.200.247:9995"'
|
line: 'FLOW_COLLECTOR="192.168.200.247:9995"'
|
||||||
become: true
|
become: true
|
||||||
- name: enable fprobe service and ensure it is not masked
|
- name: enable fprobe service and ensure it is not masked
|
||||||
systemd:
|
systemd:
|
||||||
name: fprobe
|
name: fprobe
|
||||||
enabled: yes
|
enabled: yes
|
||||||
|
|||||||
0
roles/public/tasks/main.yaml
Normal file → Executable file
0
roles/public/tasks/main.yaml
Normal file → Executable file
Reference in New Issue
Block a user