diff --git a/.kitchen.vagrant.yml b/.kitchen.vagrant.yml index 6e0b675..9030a0b 100644 --- a/.kitchen.vagrant.yml +++ b/.kitchen.vagrant.yml @@ -27,4 +27,3 @@ suites: - name: default run_list: attributes: - diff --git a/.kitchen.yml b/.kitchen.yml index 8b4bfea..7409189 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -35,4 +35,3 @@ suites: - name: default run_list: attributes: - diff --git a/.travis.yml b/.travis.yml index ede8fe6..64342a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -78,4 +78,3 @@ script: notifications: webhooks: https://galaxy.ansible.com/api/v1/notifications/ - diff --git a/.travis.yml.docker b/.travis.yml.docker index 7395d16..0e75af2 100644 --- a/.travis.yml.docker +++ b/.travis.yml.docker @@ -77,4 +77,3 @@ script: notifications: webhooks: https://galaxy.ansible.com/api/v1/notifications/ - diff --git a/.travis.yml.lxd b/.travis.yml.lxd index c7cdeeb..b5590e7 100644 --- a/.travis.yml.lxd +++ b/.travis.yml.lxd @@ -91,4 +91,3 @@ script: notifications: webhooks: https://galaxy.ansible.com/api/v1/notifications/ - diff --git a/.travis.yml.lxd-kitchen b/.travis.yml.lxd-kitchen index 5d862a7..6625b47 100644 --- a/.travis.yml.lxd-kitchen +++ b/.travis.yml.lxd-kitchen @@ -72,4 +72,3 @@ script: notifications: webhooks: https://galaxy.ansible.com/api/v1/notifications/ - diff --git a/.travis.yml.simple b/.travis.yml.simple index e4cc721..c189ada 100644 --- a/.travis.yml.simple +++ b/.travis.yml.simple @@ -34,4 +34,3 @@ script: # Serverspec # - "test/integration/default/serverspec/run-local-tests.sh" - "cd test/integration/default/serverspec/ && bundle exec rake spec" - diff --git a/defaults/main.yml b/defaults/main.yml index ad2809c..402e1bb 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -6,4 +6,3 @@ fprobe_flow_collector: '127.0.0.1:9995' ## downgrade user and chroot to dir #fprobe_args: '-fip -u nobody -c /var/empty' ## not working with user nobody or non-existing chrooted dir fprobe_args: '-fip -c /var/tmp' - diff --git a/get-dependencies.sh b/get-dependencies.sh index 826d1d1..de0d602 100755 --- a/get-dependencies.sh +++ b/get-dependencies.sh @@ -9,11 +9,10 @@ else rolesdir=$(dirname $0)/.. fi -[ ! -d $rolesdir/juju4.redhat-epel ] && git clone https://github.com/juju4/ansible-redhat-epel $rolesdir/juju4.redhat-epel +[ ! -d $rolesdir/juju4.redhat_epel ] && git clone https://github.com/juju4/ansible-redhat-epel $rolesdir/juju4.redhat_epel ## galaxy naming: kitchen fails to transfer symlink folder #[ ! -e $rolesdir/juju4.fprobe ] && ln -s ansible-fprobe $rolesdir/juju4.fprobe [ ! -e $rolesdir/juju4.fprobe ] && cp -R $rolesdir/ansible-fprobe $rolesdir/juju4.fprobe ## don't stop build on this script return code true - diff --git a/handlers/main.yml b/handlers/main.yml index be754b2..9d2c972 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -3,4 +3,3 @@ - name: restart fprobe service: name={{ fprobe_svc }} state=restarted sleep=5 ignore_errors: true - diff --git a/meta/main.yml b/meta/main.yml index dcc633c..fdc596a 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -4,11 +4,6 @@ galaxy_info: description: setup fprobe as netflow exporter license: BSD min_ansible_version: 2.0 - # - # Below are all platforms currently available. Just uncomment - # the ones that apply to your role. If you don't see your - # platform on this list, let us know and we'll get it added! - # platforms: - name: EL versions: @@ -20,14 +15,9 @@ galaxy_info: - trusty - xenial - bionic - # - # Below are all categories currently available. Just as with - # the platforms above, uncomment those that apply to your role. - # galaxy_tags: - system - security #dependencies: [] dependencies: - - juju4.redhat-epel - + - juju4.redhat_epel diff --git a/tasks/fprobe.yml b/tasks/fprobe.yml index 8914794..5a116b7 100644 --- a/tasks/fprobe.yml +++ b/tasks/fprobe.yml @@ -1,8 +1,9 @@ --- - name: install fprobe from packages - package: name={{ item }} state=present - with_items: "{{ fprobe_pkg }}" + package: name={{ fprobe_pkg }} state=present + register: pkg_result + until: pkg_result is success - name: Debian | update fprobe config replace: "dest=/etc/default/fprobe regexp={{ item.re }} replace={{ item.rep }} backup=yes" @@ -28,7 +29,9 @@ # changed_when: false # - name: RedHat | start fprobe manually # command: "fprobe-ulog -c /var/tmp {{ fprobe_flow_collector }}" -# when: ansible_os_family == 'RedHat' and ps is defined and ps.stdout is defined and ps.stdout.find(" fprobe-ulog ") == -1 +# when: > +# ansible_os_family == 'RedHat' and ps is defined and ps.stdout is defined and +# ps.stdout.find(" fprobe-ulog ") == -1 - block: - name: install fprobe systemd configuration diff --git a/tasks/immutable.yml b/tasks/immutable.yml index 8cc81c9..8d3ba5d 100644 --- a/tasks/immutable.yml +++ b/tasks/immutable.yml @@ -26,5 +26,3 @@ # attributes: '----i-----I--e--' when: state == 'post' ignore_errors: true - - diff --git a/tasks/main.yml b/tasks/main.yml index 103ebe3..7a4abb3 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -8,13 +8,12 @@ when: ansible_distribution == 'Ubuntu' - name: Include version-specific variables for RedHat include_vars: "RedHat-{{ ansible_distribution_version.split('.')[0] }}.yml" - when: ansible_os_family == "RedHat" or ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' + when: ansible_os_family == "RedHat" #- include: debian.yml # when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' #- include: redhat.yml -# when: ansible_os_family == "RedHat" or ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' +# when: ansible_os_family == "RedHat" - include: fprobe.yml - diff --git a/test/vagrant/site.yml b/test/vagrant/site.yml index a46dbe4..6dafff4 100644 --- a/test/vagrant/site.yml +++ b/test/vagrant/site.yml @@ -3,4 +3,3 @@ - hosts: all roles: - juju4.fprobe - diff --git a/vars/RedHat-6.yml b/vars/RedHat-6.yml index 5b1c264..6fbacfb 100644 --- a/vars/RedHat-6.yml +++ b/vars/RedHat-6.yml @@ -4,4 +4,3 @@ fprobe_pkg: - fprobe-ulog fprobe_svc: fprobe-ulog - diff --git a/vars/RedHat-7.yml b/vars/RedHat-7.yml index 5b1c264..6fbacfb 100644 --- a/vars/RedHat-7.yml +++ b/vars/RedHat-7.yml @@ -4,4 +4,3 @@ fprobe_pkg: - fprobe-ulog fprobe_svc: fprobe-ulog - diff --git a/vars/Ubuntu-12.04.yml b/vars/Ubuntu-12.04.yml index 91c7f20..2273eb1 100644 --- a/vars/Ubuntu-12.04.yml +++ b/vars/Ubuntu-12.04.yml @@ -4,4 +4,3 @@ fprobe_pkg: - fprobe fprobe_svc: fprobe - diff --git a/vars/Ubuntu-14.04.yml b/vars/Ubuntu-14.04.yml index 91c7f20..2273eb1 100644 --- a/vars/Ubuntu-14.04.yml +++ b/vars/Ubuntu-14.04.yml @@ -4,4 +4,3 @@ fprobe_pkg: - fprobe fprobe_svc: fprobe - diff --git a/vars/Ubuntu-16.04.yml b/vars/Ubuntu-16.04.yml index 91c7f20..2273eb1 100644 --- a/vars/Ubuntu-16.04.yml +++ b/vars/Ubuntu-16.04.yml @@ -4,4 +4,3 @@ fprobe_pkg: - fprobe fprobe_svc: fprobe - diff --git a/vars/Ubuntu-18.04.yml b/vars/Ubuntu-18.04.yml index 91c7f20..2273eb1 100644 --- a/vars/Ubuntu-18.04.yml +++ b/vars/Ubuntu-18.04.yml @@ -4,4 +4,3 @@ fprobe_pkg: - fprobe fprobe_svc: fprobe -