require 'serverspec' set :backend, :exec puts puts '================================' puts %x(ansible --version) puts '================================' sleep 60 describe package('docker-ce') do it { should be_installed } end describe command('docker network list') do its(:exit_status) { should eq 0 } its(:stdout) { should match 'proxy' } end describe command('docker ps') do its(:exit_status) { should eq 0 } its(:stdout) { should match 'whoami' } its(:stdout) { should match 'traefik' } end describe command('curl -H "Host: whoami" http://127.0.0.1') do its(:exit_status) { should eq 0 } its(:stdout) { should match "I'm " } end