-consolidate sipp

-add clean_hosts
This commit is contained in:
Pi
2019-03-18 16:18:59 -04:00
parent 49fd61019b
commit c58e4852c0
7 changed files with 41 additions and 2 deletions

View File

@@ -23,6 +23,13 @@
content: "{{ lookup('template', '{{ role_path }}/templates/hosts.j2') }}"
state: present
tags: update_hosts
- name: clean hosts file
become: true
blockinfile:
path: /etc/hosts
marker: "# {mark} ANSIBLE MANAGED BLOCK"
content: ""
tags: clean_hosts
- name: install programs and libraries
become: true
apt:
@@ -30,3 +37,8 @@
update_cache: true
state: present
tags: install_packages
- name: set hostname
become: true
hostname:
name: '{{ inventory_hostname }}'
tags: set_hostname

View File

@@ -11,7 +11,7 @@
state: present
backrefs: yes
regexp: '^FLOW_COLLECTOR='
line: 'FLOW_COLLECTOR="192.168.201.53:9996"'
line: 'FLOW_COLLECTOR="192.168.201.11:2055"'
become: true
tags: configure_fprobe
- name: enable fprobe service and ensure it is not masked

View File

@@ -31,3 +31,16 @@
args:
chdir: "/home/pi/sipp"
tags: sipp
- name: copy scripts
when: sipp_move_directory is changed
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: pi
group: pi
mode: a+x
with_items:
- { src: "{{ role_path }}/files/startserver.sh", dest: "/home/pi/sipp/startserver.sh" }
- { src: "{{ role_path }}/files/startclient.sh", dest: "/home/pi/sipp/startclient.sh" }
tags: sipp