apt:
sources:
- openstreetmap
+ - name: mailman
+ run_list:
+ - recipe[mailman::default]
- name: memcached
run_list:
- recipe[memcached::default]
- name: "Test Kitchen (letsencrypt)"
script:
- bundle exec kitchen test letsencrypt-ubuntu-1804
+ - name: "Test Kitchen (mailman)"
+ script:
+ - bundle exec kitchen test mailman-ubuntu-1804
- name: "Test Kitchen (memcached)"
script:
- bundle exec kitchen test memcached-ubuntu-1804
notifies :restart, "service[mailman]"
end
+execute "newlist" do
+ command "newlist -q mailman mailman@example.com mailman"
+ user "root"
+ group "root"
+ not_if { ::File.exist?("/var/lib/mailman/lists/mailman/") }
+end
+
service "mailman" do
action [:enable, :start]
supports :restart => true, :reload => true
--- /dev/null
+require "serverspec"
+
+# Required by serverspec
+set :backend, :exec
+
+describe package("apache2") do
+ it { should be_installed }
+end
+
+describe service("apache2") do
+ it { should be_enabled }
+ it { should be_running }
+end
+
+describe port(80) do
+ it { should be_listening.with("tcp") }
+end
+
+describe port(443) do
+ it { should be_listening.with("tcp") }
+end
--- /dev/null
+require "serverspec"
+
+# Required by serverspec
+set :backend, :exec
+
+describe package("mailman") do
+ it { should be_installed }
+end
+
+describe service("mailman") do
+ it { should be_enabled }
+ it { should be_running }
+end