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
46
roles/netflows/tasks/main.yaml
Normal file → Executable file
46
roles/netflows/tasks/main.yaml
Normal file → Executable 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
0
roles/public/tasks/main.yaml
Normal file → Executable file
Reference in New Issue
Block a user