--- <% vagrant = system('gem list -i kitchen-vagrant 2>/dev/null >/dev/null') %> <% version = '2018.3.3' %> <% platformsfile = ENV['SALT_KITCHEN_PLATFORMS'] || '.kitchen/platforms.yml' %> <% driverfile = ENV['SALT_KITCHEN_DRIVER'] || '.kitchen/driver.yml' %> <% verifierfile = ENV['SALT_KITCHEN_VERIFIER'] || '.kitchen/verifier.yml' %> <% if File.exists?(driverfile) %> <%= ERB.new(File.read(driverfile)).result %> <% else %> driver: name: docker use_sudo: false hostname: salt privileged: false username: kitchen env_variables: LANG: en_US.utf8 volume: - /sys/fs/cgroup:/sys/fs/cgroup:ro - /var/run/docker.sock:/docker.sock tmpfs: - /tmp:exec - /run disable_upstart: false provision_command: - systemctl enable sshd - echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf run_command: /sbin/init transport: name: rsync <% end %> provisioner: name: salt_solo salt_version: false salt_install: false run_salt_call: false install_after_init_environment: false log_level: info sudo: true require_chef: false retry_on_exit_code: - 139 max_retries: 2 salt_copy_filter: - __pycache__ - '*.pyc' - .bundle - .tox - .nox - .kitchen - artifacts - Gemfile.lock # Remote states needs to be defined and under it testingdir or else # the local directory isn't copied over to the VM's/Containers that # get spun up. remote_states: testingdir: /testing state_top: {} pillars: {} <% if File.exists?(platformsfile) %> <%= ERB.new(File.read(platformsfile)).result %> <% else %> platforms: - name: arch driver_config: image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-arch-lts' %> - name: amazon-2 driver_config: image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-amazon-2' %> - name: centos-7 driver_config: image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-centos-7' %> - name: centos-8 driver_config: image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-centos-8' %> - name: debian-9 driver_config: image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-debian-9' %> provision_command: - systemctl enable ssh - echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf - name: debian-10 driver_config: image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-debian-10' %> provision_command: - systemctl enable ssh - echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf - name: fedora-31 driver_config: image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-fedora-31' %> - name: fedora-32 driver_config: image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-fedora-32' %> - name: opensuse-15 driver_config: image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-opensuse-15' %> - name: ubuntu-16.04 driver_config: image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-ubuntu-1604' %> provision_command: - systemctl enable ssh - echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf - name: ubuntu-18.04 driver_config: image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-ubuntu-1804' %> provision_command: - systemctl enable ssh - echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf - name: ubuntu-20.04 driver_config: image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-ubuntu-2004' %> provision_command: - systemctl enable ssh - echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf <% if vagrant != false %> - name: windows-2012r2 driver: box: mwrock/Windows2012R2 name: vagrant gui: true transport: name: winrm username: Administrator password: Pass@word1 provisioner: init_environment: | Clear-Host $AddedLocation ="c:\salt;c:\salt\bin\Scripts" $Reg = "Registry::HKLM\System\CurrentControlSet\Control\Session Manager\Environment" $OldPath = (Get-ItemProperty -Path $Reg -Name PATH).Path $NewPath= $OldPath + ";" + $AddedLocation Set-ItemProperty -Path $Reg -Value $NewPath -Name PATH reg add "hklm\system\currentcontrolset\control\session manager\memory management" /v pagingfiles /t reg_multi_sz /d "d:\pagefile.sys 4096 8192" /f winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="5000"}' salt_bootstrap_url: https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.ps1 salt_bootstrap_options: '' - name: windows-2016 driver: box: mwrock/Windows2016 name: vagrant gui: true customize: cpus: 4 memory: 8192 transport: name: winrm username: Vagrant password: vagrant provisioner: salt_bootstrap_url: https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.ps1 salt_bootstrap_options: -version <%= version %> init_environment: | Clear-Host $AddedLocation ="c:\salt;c:\salt\bin\Scripts" $Reg = "Registry::HKLM\System\CurrentControlSet\Control\Session Manager\Environment" $OldPath = (Get-ItemProperty -Path $Reg -Name PATH).Path $NewPath= $OldPath + ";" + $AddedLocation Set-ItemProperty -Path $Reg -Value $NewPath -Name PATH reg add "hklm\system\currentcontrolset\control\session manager\memory management" /v pagingfiles /t reg_multi_sz /d "d:\pagefile.sys 4096 8192" /f winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="5000"}' salt_bootstrap_url: https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.ps1 salt_bootstrap_options: '' <% end %> <% end %> suites: - name: py3 <% if File.exists?(verifierfile) %> <%= ERB.new(File.read(verifierfile)).result %> <% else %> verifier: name: nox run_destructive: true coverage: true junitxml: true sudo: true transport: zeromq sysinfo: true sys_stats: true <% end %>