Ansible changed_when fix; ansible/vagrant lint (#1734)
This commit is contained in:
parent
e674537d0b
commit
faf3670e7f
67 changed files with 339 additions and 240 deletions
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
- name: "prepare functional tests"
|
||||
hosts: all
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
- name: "install Go (!bsd)"
|
||||
hosts: all
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
- name: "install the test scripts"
|
||||
hosts: all
|
||||
|
|
|
@ -1,9 +1,18 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
- src: geerlingguy.mysql
|
||||
- src: geerlingguy.repo-epel
|
||||
- src: gantsign.golang
|
||||
- src: https://github.com/crowdsecurity/ansible-role-postgresql
|
||||
version: crowdsec
|
||||
name: geerlingguy.postgresql
|
||||
roles:
|
||||
- src: geerlingguy.mysql
|
||||
- src: geerlingguy.repo-epel
|
||||
- src: gantsign.golang
|
||||
- src: https://github.com/crowdsecurity/ansible-role-postgresql
|
||||
version: crowdsec
|
||||
name: geerlingguy.postgresql
|
||||
|
||||
#collections:
|
||||
# - name: crowdsecurity.testing
|
||||
# source: ~/src/crowdsecurity.testing/crowdsecurity/testing
|
||||
# type: dir
|
||||
|
||||
# - name: crowdsecurity.testing
|
||||
# src: https://github.com/crowdsecurity/crowdsecurity.testing
|
||||
# version: main
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
build_bash: false
|
||||
bash_version: 5.1.16
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
- name: "check if we need to build bash"
|
||||
become: false
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
- name: "install daemonize package"
|
||||
become: true
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
- name: "install bash"
|
||||
ansible.builtin.import_tasks: bash.yml
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
- name: "install netcat (Amazon, Fedora, CentOS, Oracle)"
|
||||
become: true
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
- name: "update package cache (Debian)"
|
||||
become: true
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
- name: "set package_file from package_dir"
|
||||
ansible.builtin.set_fact:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
- name: "install stuff"
|
||||
become: true
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
- name: "set package_file from package_dir"
|
||||
ansible.builtin.set_fact:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
- name: "install crowdsec from the package repository"
|
||||
become: true
|
||||
|
@ -10,7 +11,7 @@
|
|||
- name: "stable rpm repo"
|
||||
ansible.builtin.command:
|
||||
cmd: "/root/rpm.sh"
|
||||
changed_when: false
|
||||
changed_when: true
|
||||
|
||||
- name: "testing rpm repo script"
|
||||
ansible.builtin.get_url:
|
||||
|
@ -20,7 +21,7 @@
|
|||
- name: "testing rpm repo"
|
||||
ansible.builtin.command:
|
||||
cmd: "/root/rpm-testing.sh"
|
||||
changed_when: false
|
||||
changed_when: true
|
||||
|
||||
- name: "install crowdsec"
|
||||
ansible.builtin.package:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
- name: "set releasever for RedHat family"
|
||||
ansible.builtin.set_fact:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
|
||||
package_version_deb: "{{ lookup('ansible.builtin.env', 'TEST_PACKAGE_VERSION_DEB') }}"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
suite_git: "https://github.com/crowdsecurity/crowdsec"
|
||||
suite_version: "master"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
- name: "lookup $TEST_SUITE_GIT"
|
||||
ansible.builtin.set_fact:
|
||||
|
@ -22,7 +23,7 @@
|
|||
name:
|
||||
- unzip
|
||||
|
||||
- name: "install tests: create crowdsec dir"
|
||||
- name: "install tests: create source dir"
|
||||
become: false
|
||||
ansible.builtin.file:
|
||||
path: "{{ ansible_env.HOME }}/crowdsec"
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
machine_id: "githubciXXXXXXXXXXXXXXXXXXXXXXXX\n"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
- name: "set /etc/machine-id"
|
||||
become: true
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
- name: "set make_cmd = make (!bsd)"
|
||||
ansible.builtin.set_fact:
|
||||
|
@ -66,7 +67,7 @@
|
|||
- name: "look for .environment.sh"
|
||||
ansible.builtin.slurp:
|
||||
src: "{{ ansible_env.HOME }}/crowdsec/tests/.environment.sh"
|
||||
changed_when: false
|
||||
changed_when: true
|
||||
register: envfile
|
||||
- name: "cat .environment.sh"
|
||||
ansible.builtin.debug:
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
package_testing: "{{ lookup('ansible.builtin.env', 'PACKAGE_TESTING') }}"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
- name: "tweak systemd configuration for tests"
|
||||
become: true
|
||||
|
@ -31,7 +32,7 @@
|
|||
- name: "look for .environment.sh"
|
||||
ansible.builtin.slurp:
|
||||
src: "{{ ansible_env.HOME }}/crowdsec/tests/.environment.sh"
|
||||
changed_when: false
|
||||
changed_when: true
|
||||
register: envfile
|
||||
- name: "cat .environment.sh"
|
||||
ansible.builtin.debug:
|
||||
|
@ -59,7 +60,7 @@
|
|||
# pidof -> /usr/sbin
|
||||
# bash -> /opt/bash/bin
|
||||
PATH: "/opt/bash/bin:{{ ansible_env.PATH }}:/usr/sbin:/usr/local/sbin"
|
||||
changed_when: false
|
||||
changed_when: true
|
||||
when:
|
||||
- (item.path | basename) not in skip_tests.split(',')
|
||||
rescue:
|
||||
|
@ -88,7 +89,7 @@
|
|||
# pidof -> /usr/sbin
|
||||
# bash -> /opt/bash/bin
|
||||
PATH: "/opt/bash/bin:{{ ansible_env.PATH }}:/usr/sbin:/usr/local/sbin"
|
||||
changed_when: false
|
||||
changed_when: true
|
||||
when:
|
||||
- (item.path | basename) not in skip_tests.split(',')
|
||||
rescue:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
package_testing: "{{ lookup('ansible.builtin.env', 'PACKAGE_TESTING') }}"
|
||||
skip_tests: "{{ lookup('ansible.builtin.env', 'TEST_SKIP') }}"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
- import_playbook: provision_dependencies.yml
|
||||
- import_playbook: provision_test_suite.yml
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
- name: "run functional tests"
|
||||
hosts: all
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.cpus = 1
|
||||
libvirt.memory = 1536
|
||||
end
|
||||
|
||||
config.vm.synced_folder '.', '/vagrant', disabled: true
|
||||
|
||||
config.vm.provision "ansible" do |ansible|
|
||||
# ansible.verbose = "vvvv"
|
||||
ansible.config_file = "../../ansible.cfg"
|
||||
ansible.playbook = "../../run_all.yml"
|
||||
end
|
||||
|
||||
# same as above, to run the steps separately
|
||||
|
||||
# config.vm.provision "ansible" do |provdep|
|
||||
# provdep.config_file = "../../ansible-common.cfg"
|
||||
# provdep.playbook = "../../provision_dependencies.yml"
|
||||
# end
|
||||
# config.vm.provision "ansible" do |provtest|
|
||||
# provtest.config_file = "../../ansible-common.cfg"
|
||||
# provtest.playbook = "../../provision_test_suite.yml"
|
||||
# end
|
||||
# config.vm.provision "ansible" do |preptest|
|
||||
# preptest.config_file = "../../ansible-common.cfg"
|
||||
# preptest.playbook = "../../prepare_tests.yml"
|
||||
# end
|
||||
# config.vm.provision "ansible" do |runtests|
|
||||
# runtests.config_file = "../../ansible-common.cfg"
|
||||
# runtests.playbook = "../../run_tests.yml"
|
||||
# end
|
||||
|
||||
end
|
10
tests/ansible/vagrant/alma-8/Vagrantfile
vendored
10
tests/ansible/vagrant/alma-8/Vagrantfile
vendored
|
@ -1,6 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/alma8"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/alma8'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
10
tests/ansible/vagrant/alma-9/Vagrantfile
vendored
10
tests/ansible/vagrant/alma-9/Vagrantfile
vendored
|
@ -1,6 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/alma9"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/alma9'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
10
tests/ansible/vagrant/centos-7/Vagrantfile
vendored
10
tests/ansible/vagrant/centos-7/Vagrantfile
vendored
|
@ -1,6 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "centos/7"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'centos/7'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
10
tests/ansible/vagrant/centos-8/Vagrantfile
vendored
10
tests/ansible/vagrant/centos-8/Vagrantfile
vendored
|
@ -1,6 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "centos/stream8"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'centos/stream8'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
10
tests/ansible/vagrant/centos-9/Vagrantfile
vendored
10
tests/ansible/vagrant/centos-9/Vagrantfile
vendored
|
@ -1,6 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/centos9s"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/centos9s'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
41
tests/ansible/vagrant/common
Normal file
41
tests/ansible/vagrant/common
Normal file
|
@ -0,0 +1,41 @@
|
|||
# vim: set ft=ruby:
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.define 'crowdsec'
|
||||
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.cpus = 1
|
||||
libvirt.memory = 1536
|
||||
end
|
||||
|
||||
config.vm.synced_folder '.', '/vagrant', disabled: true
|
||||
|
||||
config.vm.provision 'ansible' do |ansible|
|
||||
# ansible.verbose = 'vvvv'
|
||||
ansible.config_file = '../../ansible.cfg'
|
||||
ansible.playbook = '../../run_all.yml'
|
||||
end
|
||||
|
||||
# same as above, to run the steps separately
|
||||
|
||||
# config.vm.provision 'ansible' do |provdep|
|
||||
# provdep.config_file = '../../ansible-common.cfg'
|
||||
# provdep.playbook = '../../provision_dependencies.yml'
|
||||
# end
|
||||
|
||||
# config.vm.provision 'ansible' do |provtest|
|
||||
# provtest.config_file = '../../ansible-common.cfg'
|
||||
# provtest.playbook = '../../provision_test_suite.yml'
|
||||
# end
|
||||
|
||||
# config.vm.provision 'ansible' do |preptest|
|
||||
# preptest.config_file = '../../ansible-common.cfg'
|
||||
# preptest.playbook = '../../prepare_tests.yml'
|
||||
# end
|
||||
|
||||
# config.vm.provision 'ansible' do |runtests|
|
||||
# runtests.config_file = '../../ansible-common.cfg'
|
||||
# runtests.playbook = '../../run_tests.yml'
|
||||
# end
|
||||
end
|
|
@ -1,6 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "debian/buster64"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'debian/buster64'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "debian/bullseye64"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'debian/bullseye64'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "debian/stretch64"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'debian/stretch64'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
10
tests/ansible/vagrant/debian-testing/Vagrantfile
vendored
10
tests/ansible/vagrant/debian-testing/Vagrantfile
vendored
|
@ -1,6 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "debian/testing64"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'debian/testing64'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/alpine316"
|
||||
config.vm.provision "shell", path: "bootstrap"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/alpine316'
|
||||
config.vm.define 'crowdsec'
|
||||
|
||||
config.vm.provision 'shell', path: 'bootstrap'
|
||||
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.cpus = 1
|
||||
|
@ -9,10 +13,8 @@ Vagrant.configure("2") do |config|
|
|||
|
||||
config.vm.synced_folder '.', '/vagrant', disabled: true
|
||||
|
||||
config.vm.provision "ansible" do |ansible|
|
||||
# ansible.verbose = "vvvv"
|
||||
ansible.config_file = "../../../ansible.cfg"
|
||||
ansible.playbook = "../../../run_all.yml"
|
||||
config.vm.provision 'ansible' do |ansible|
|
||||
ansible.config_file = '../../../ansible.cfg'
|
||||
ansible.playbook = '../../../run_all.yml'
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "cloudnatives/amazon-linux-2"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'cloudnatives/amazon-linux-2'
|
||||
config.vm.define 'crowdsec'
|
||||
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.cpus = 1
|
||||
|
@ -8,10 +11,8 @@ Vagrant.configure("2") do |config|
|
|||
|
||||
config.vm.synced_folder '.', '/vagrant', disabled: true
|
||||
|
||||
config.vm.provision "ansible" do |ansible|
|
||||
# ansible.verbose = "vvvv"
|
||||
ansible.config_file = "../../../ansible.cfg"
|
||||
ansible.playbook = "../../../run_all.yml"
|
||||
config.vm.provision 'ansible' do |ansible|
|
||||
ansible.config_file = '../../../ansible.cfg'
|
||||
ansible.playbook = '../../../run_all.yml'
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/arch"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/arch'
|
||||
config.vm.define 'crowdsec'
|
||||
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.cpus = 1
|
||||
|
@ -8,10 +11,8 @@ Vagrant.configure("2") do |config|
|
|||
|
||||
config.vm.synced_folder '.', '/vagrant', disabled: true
|
||||
|
||||
config.vm.provision "ansible" do |ansible|
|
||||
# ansible.verbose = "vvvv"
|
||||
ansible.config_file = "../../../ansible.cfg"
|
||||
ansible.playbook = "../../../run_all.yml"
|
||||
config.vm.provision 'ansible' do |ansible|
|
||||
ansible.config_file = '../../../ansible.cfg'
|
||||
ansible.playbook = '../../../run_all.yml'
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/devuan3"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/devuan3'
|
||||
config.vm.define 'crowdsec'
|
||||
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.cpus = 1
|
||||
|
@ -8,10 +11,8 @@ Vagrant.configure("2") do |config|
|
|||
|
||||
config.vm.synced_folder '.', '/vagrant', disabled: true
|
||||
|
||||
config.vm.provision "ansible" do |ansible|
|
||||
# ansible.verbose = "vvvv"
|
||||
ansible.config_file = "../../../ansible.cfg"
|
||||
ansible.playbook = "../../../run_all.yml"
|
||||
config.vm.provision 'ansible' do |ansible|
|
||||
ansible.config_file = '../../../ansible.cfg'
|
||||
ansible.playbook = '../../../run_all.yml'
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/dragonflybsd6"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/dragonflybsd6'
|
||||
config.vm.define 'crowdsec'
|
||||
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.cpus = 1
|
||||
|
@ -8,10 +11,8 @@ Vagrant.configure("2") do |config|
|
|||
|
||||
config.vm.synced_folder '.', '/vagrant', disabled: true
|
||||
|
||||
config.vm.provision "ansible" do |ansible|
|
||||
# ansible.verbose = "vvvv"
|
||||
ansible.config_file = "../../../ansible.cfg"
|
||||
ansible.playbook = "../../../run_all.yml"
|
||||
config.vm.provision 'ansible' do |ansible|
|
||||
ansible.config_file = '../../../ansible.cfg'
|
||||
ansible.playbook = '../../../run_all.yml'
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/gentoo"
|
||||
config.vm.provision "shell", path: "bootstrap"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/gentoo'
|
||||
config.vm.define 'crowdsec'
|
||||
|
||||
config.vm.provision 'shell', path: 'bootstrap'
|
||||
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.cpus = 1
|
||||
|
@ -9,10 +13,8 @@ Vagrant.configure("2") do |config|
|
|||
|
||||
config.vm.synced_folder '.', '/vagrant', disabled: true
|
||||
|
||||
config.vm.provision "ansible" do |ansible|
|
||||
# ansible.verbose = "vvvv"
|
||||
ansible.config_file = "../../../ansible.cfg"
|
||||
ansible.playbook = "../../../run_all.yml"
|
||||
config.vm.provision 'ansible' do |ansible|
|
||||
ansible.config_file = '../../../ansible.cfg'
|
||||
ansible.playbook = '../../../run_all.yml'
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/hardenedbsd13"
|
||||
config.vm.provision "shell", path: "bootstrap"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/hardenedbsd13'
|
||||
config.vm.define 'crowdsec'
|
||||
|
||||
config.vm.provision 'shell', path: 'bootstrap'
|
||||
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.cpus = 1
|
||||
|
@ -9,10 +13,8 @@ Vagrant.configure("2") do |config|
|
|||
|
||||
config.vm.synced_folder '.', '/vagrant', disabled: true
|
||||
|
||||
config.vm.provision "ansible" do |ansible|
|
||||
# ansible.verbose = "vvvv"
|
||||
ansible.config_file = "../../../ansible.cfg"
|
||||
ansible.playbook = "../../../run_all.yml"
|
||||
config.vm.provision 'ansible' do |ansible|
|
||||
ansible.config_file = '../../../ansible.cfg'
|
||||
ansible.playbook = '../../../run_all.yml'
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/netbsd9"
|
||||
# config.vm.provision "shell", path: "bootstrap"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/netbsd9'
|
||||
config.vm.define 'crowdsec'
|
||||
|
||||
# config.vm.provision 'shell', path: 'bootstrap'
|
||||
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.cpus = 1
|
||||
|
@ -9,10 +13,8 @@ Vagrant.configure("2") do |config|
|
|||
|
||||
config.vm.synced_folder '.', '/vagrant', disabled: true
|
||||
|
||||
config.vm.provision "ansible" do |ansible|
|
||||
# ansible.verbose = "vvvv"
|
||||
ansible.config_file = "../../../ansible.cfg"
|
||||
ansible.playbook = "../../../run_all.yml"
|
||||
config.vm.provision 'ansible' do |ansible|
|
||||
ansible.config_file = '../../../ansible.cfg'
|
||||
ansible.playbook = '../../../run_all.yml'
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/openbsd7"
|
||||
config.vm.provision "shell", path: "bootstrap"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/openbsd7'
|
||||
config.vm.define 'crowdsec'
|
||||
|
||||
config.vm.provision 'shell', path: 'bootstrap'
|
||||
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.cpus = 1
|
||||
|
@ -9,10 +13,8 @@ Vagrant.configure("2") do |config|
|
|||
|
||||
config.vm.synced_folder '.', '/vagrant', disabled: true
|
||||
|
||||
config.vm.provision "ansible" do |ansible|
|
||||
# ansible.verbose = "vvvv"
|
||||
ansible.config_file = "../../../ansible.cfg"
|
||||
ansible.playbook = "../../../run_all.yml"
|
||||
config.vm.provision 'ansible' do |ansible|
|
||||
ansible.config_file = '../../../ansible.cfg'
|
||||
ansible.playbook = '../../../run_all.yml'
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "opensuse/Leap-15.4.x86_64"
|
||||
config.vm.provision "shell", path: "bootstrap"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'opensuse/Leap-15.4.x86_64'
|
||||
config.vm.define 'crowdsec'
|
||||
|
||||
config.vm.provision 'shell', path: 'bootstrap'
|
||||
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.cpus = 1
|
||||
|
@ -9,10 +13,8 @@ Vagrant.configure("2") do |config|
|
|||
|
||||
config.vm.synced_folder '.', '/vagrant', disabled: true
|
||||
|
||||
config.vm.provision "ansible" do |ansible|
|
||||
# ansible.verbose = "vvvv"
|
||||
ansible.config_file = "../../../ansible.cfg"
|
||||
ansible.playbook = "../../../run_all.yml"
|
||||
config.vm.provision 'ansible' do |ansible|
|
||||
ansible.config_file = '../../../ansible.cfg'
|
||||
ansible.playbook = '../../../run_all.yml'
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "peru/ubuntu-14.04-server-amd64"
|
||||
config.vm.box_version = "20190901.01"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'peru/ubuntu-14.04-server-amd64'
|
||||
config.vm.define 'crowdsec'
|
||||
|
||||
config.vm.box_version = '20190901.01'
|
||||
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.cpus = 1
|
||||
|
@ -9,10 +13,8 @@ Vagrant.configure("2") do |config|
|
|||
|
||||
config.vm.synced_folder '.', '/vagrant', disabled: true
|
||||
|
||||
config.vm.provision "ansible" do |ansible|
|
||||
# ansible.verbose = "vvvv"
|
||||
ansible.config_file = "../../../ansible.cfg"
|
||||
ansible.playbook = "../../../run_all.yml"
|
||||
config.vm.provision 'ansible' do |ansible|
|
||||
ansible.config_file = '../../../ansible.cfg'
|
||||
ansible.playbook = '../../../run_all.yml'
|
||||
end
|
||||
|
||||
end
|
||||
|
|
11
tests/ansible/vagrant/fedora-33/Vagrantfile
vendored
11
tests/ansible/vagrant/fedora-33/Vagrantfile
vendored
|
@ -1,8 +1,9 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
# the official boxes seem to have issues with journalctl
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
# config.vm.box = "fedora/33-cloud-base"
|
||||
config.vm.box = "generic/fedora33"
|
||||
config.vm.box = 'generic/fedora33'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
11
tests/ansible/vagrant/fedora-34/Vagrantfile
vendored
11
tests/ansible/vagrant/fedora-34/Vagrantfile
vendored
|
@ -1,8 +1,9 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
# the official boxes seem to have issues with journalctl
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
# config.vm.box = "fedora/34-cloud-base"
|
||||
config.vm.box = "generic/fedora34"
|
||||
config.vm.box = 'generic/fedora34'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
13
tests/ansible/vagrant/fedora-35/Vagrantfile
vendored
13
tests/ansible/vagrant/fedora-35/Vagrantfile
vendored
|
@ -1,8 +1,9 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
# the official boxes seem to have issues with journalctl
|
||||
# config.vm.box = "fedora/35-cloud-base"
|
||||
config.vm.box = "generic/fedora35"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
# config.vm.box = 'fedora/35-cloud-base'
|
||||
config.vm.box = 'generic/fedora35'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
11
tests/ansible/vagrant/fedora-36/Vagrantfile
vendored
11
tests/ansible/vagrant/fedora-36/Vagrantfile
vendored
|
@ -1,8 +1,9 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
# the official boxes seem to have issues with journalctl
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
# config.vm.box = "fedora/36-cloud-base"
|
||||
config.vm.box = "generic/fedora36"
|
||||
config.vm.box = 'generic/fedora36'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
10
tests/ansible/vagrant/freebsd-12/Vagrantfile
vendored
10
tests/ansible/vagrant/freebsd-12/Vagrantfile
vendored
|
@ -1,6 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/freebsd12"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/freebsd12'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
10
tests/ansible/vagrant/freebsd-13/Vagrantfile
vendored
10
tests/ansible/vagrant/freebsd-13/Vagrantfile
vendored
|
@ -1,6 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/freebsd13"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/freebsd13'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
10
tests/ansible/vagrant/oracle-7/Vagrantfile
vendored
10
tests/ansible/vagrant/oracle-7/Vagrantfile
vendored
|
@ -1,6 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/oracle7"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/oracle7'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
10
tests/ansible/vagrant/oracle-8/Vagrantfile
vendored
10
tests/ansible/vagrant/oracle-8/Vagrantfile
vendored
|
@ -1,6 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/oracle8"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/oracle8'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
10
tests/ansible/vagrant/oracle-9/Vagrantfile
vendored
10
tests/ansible/vagrant/oracle-9/Vagrantfile
vendored
|
@ -1,6 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/oracle9"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/oracle9'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
10
tests/ansible/vagrant/rocky-8/Vagrantfile
vendored
10
tests/ansible/vagrant/rocky-8/Vagrantfile
vendored
|
@ -1,6 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/rocky8"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/rocky8'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
10
tests/ansible/vagrant/rocky-9/Vagrantfile
vendored
10
tests/ansible/vagrant/rocky-9/Vagrantfile
vendored
|
@ -1,6 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/rocky9"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/rocky9'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
# the official boxes only supports virtualbox
|
||||
config.vm.box = "generic/ubuntu1604"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/ubuntu1604'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
# the official boxes only supports virtualbox
|
||||
config.vm.box = "generic/ubuntu1804"
|
||||
config.vm.box = 'generic/ubuntu1804'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
# the official boxes only supports virtualbox
|
||||
config.vm.box = "generic/ubuntu2004"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/ubuntu2004'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
# the official boxes only supports virtualbox
|
||||
config.vm.box = "generic/ubuntu2204"
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'generic/ubuntu2204'
|
||||
end
|
||||
|
||||
common = '../Vagrantfile.common'
|
||||
load common if File.exists?(common)
|
||||
common = '../common'
|
||||
load common if File.exist?(common)
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
golang_version: "1.18.2"
|
||||
# vim: set ft=yaml.ansible:
|
||||
golang_version: "1.18.5"
|
||||
golang_install_dir: "/opt/go/{{ golang_version }}"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
|
||||
# The password is insecure since the db is ephemeral and only listen to localhost.
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# vim: set ft=yaml.ansible:
|
||||
---
|
||||
|
||||
# The password is insecure since the db is ephemeral and only listen to localhost.
|
||||
|
|
|
@ -4,10 +4,6 @@
|
|||
# https://github.com/bats-core/bats-core/blob/master/docs/source/warnings/BW02.rst
|
||||
bats_require_minimum_version 1.5.0
|
||||
|
||||
# this should have effect globally, for all tests
|
||||
# https://github.com/bats-core/bats-core/blob/master/docs/source/warnings/BW02.rst
|
||||
bats_require_minimum_version 1.5.0
|
||||
|
||||
debug() {
|
||||
echo 'exec 1<&-; exec 2<&-; exec 1>&3; exec 2>&1'
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue