diff --git a/Vagrantfile b/Vagrantfile index fe0e048..62a1d45 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -5,14 +5,6 @@ role = File.basename(File.expand_path(File.dirname(__FILE__))) boxes = [ - { - :name => "ubuntu-1004", - :box => "opscode-ubuntu-10.04", - :url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-10.04_chef-provisionerless.box", - :ip => '10.0.0.10', - :cpu => "50", - :ram => "256" - }, { :name => "ubuntu-1204", :box => "opscode-ubuntu-12.04", @@ -29,14 +21,6 @@ boxes = [ :cpu => "50", :ram => "256" }, - { - :name => "debian-6010", - :box => "opscode-debian-6.0.10", - :url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-6.0.10_chef-provisionerless.box", - :ip => '10.0.0.13', - :cpu => "50", - :ram => "256" - }, { :name => "debian-79", :box => "opscode-debian-7.9", diff --git a/meta/main.yml b/meta/main.yml index 327318a..bdebb3a 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -9,12 +9,10 @@ galaxy_info: platforms: - name: Ubuntu versions: - - lucid - precise - trusty - name: Debian versions: - - squeeze - wheezy - jessie galaxy_tags: diff --git a/tasks/main.yml b/tasks/main.yml index c8e3f7c..3e8a4be 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -2,11 +2,15 @@ --- - name: install apt: - name: fail2ban + name: "{{ item }}" state: latest update_cache: true cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}" - tags: [configuration, fail2ban, fail2ban-install] + with_items: "{{ fail2ban_dependencies }}" + tags: + - configuration + - fail2ban + - fail2ban-install - name: update configuration file - /etc/fail2ban/fail2ban.conf template: @@ -16,7 +20,10 @@ group: root mode: 0644 notify: restart fail2ban - tags: [configuration, fail2ban, fail2ban-configuration] + tags: + - configuration + - fail2ban + - fail2ban-configuration - name: update configuration file - /etc/fail2ban/jail.local template: @@ -26,7 +33,10 @@ group: root mode: 0644 notify: restart fail2ban - tags: [configuration, fail2ban, fail2ban-configuration] + tags: + - configuration + - fail2ban + - fail2ban-configuration - name: copy filters copy: @@ -37,11 +47,17 @@ mode: 0644 when: fail2ban_filterd_path is defined notify: restart fail2ban - tags: [configuration, fail2ban, fail2ban-filters] + tags: + - configuration + - fail2ban + - fail2ban-filters - name: start and enable service service: name: fail2ban state: started enabled: true - tags: [configuration, fail2ban, fail2ban-start-enable-service] + tags: + - configuration + - fail2ban + - fail2ban-start-enable-service diff --git a/vars/main.yml b/vars/main.yml index c640ebe..7f45c3d 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,2 +1,4 @@ # vars file for fail2ban --- +fail2ban_dependencies: + - fail2ban