Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions .github/workflows/ansible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
urllib3<2

- name: Set up Python 3.
uses: actions/setup-python@v5
uses: actions/setup-python@v5.5.0
with:
python-version: '3.11'
cache: 'pip'
Expand Down Expand Up @@ -140,9 +140,25 @@ jobs:
sudo apt update && sudo apt install -y virtualbox
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install -y vagrant
sudo apt update && sudo apt install -y vagrant=2.4.3-1

- uses: DamianReeves/[email protected]
if: ${{ contains(matrix.ansible, '8.7.0') }}
with:
path: "${{ github.workspace }}/requirements.txt"
contents: |
${{ matrix.ansible }}
ansible-compat==4.1.11
ansible-core==2.15.13
ansible-lint==6.22.2
molecule==6.0.3
molecule-plugins[vagrant]==23.5.0
pywinrm==0.4.3
yamllint==1.37.0
cryptography==44.0.2

- uses: DamianReeves/[email protected]
if: ${{ contains(matrix.ansible, '9.2.0') }}
with:
path: "${{ github.workspace }}/requirements.txt"
contents: |
Expand Down Expand Up @@ -172,6 +188,18 @@ jobs:
url=$( echo "$json" | jq -r ".versions[] | select(.version == \"${box_version}\") | .providers[] | select(.name == \"virtualbox\") | .url" )
wget -nv -O /tmp/vagrant.box $url

- name: Clean VirtualBox cache
run: |
# Related issues:
# https://bbs.archlinux.org/viewtopic.php?id=298056
# https://forums.virtualbox.org/viewtopic.php?t=112438
# https://forums.virtualbox.org/viewtopic.php?t=112481
echo "3" | sudo tee /proc/sys/vm/drop_caches
echo "1" | sudo tee /proc/sys/vm/drop_caches
- name: free after clean cache
run: |
free -h

- name: Run Molecule tests.
run: molecule --debug -v --base-config ./molecule/config/windows.yml test -s ${{ matrix.scenario }} -p ${{ matrix.distro }}
env:
Expand Down
16 changes: 8 additions & 8 deletions deployments/ansible/molecule/config/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ driver:
name: virtualbox
platforms:
- name: "2016"
box: cdaf/WindowsServer
box_version: ${MOLECULE_VAGRANT_BOX_VERSION:-2022.09.01}
box: StefanScherer/windows_2016
box_version: ${MOLECULE_VAGRANT_BOX_VERSION:-2019.02.14}
box_url: ${MOLECULE_VAGRANT_BOX_URL}
cpus: 2
memory: 4096
memory: 8192
provider_options:
gui: false
linked_clone: true
instance_raw_config_args: &vagrant_args
- "vm.boot_timeout = 1200"
- "vm.boot_timeout = 2400"
- "vm.communicator = 'winrm'"
- "vm.guest = :windows"
- "vm.network 'forwarded_port', guest: 5985, host: 55985"
Expand All @@ -29,11 +29,11 @@ platforms:
- "winrm.retry_limit = 50"
- "winrm.retry_delay = 10"
- name: "2019"
box: gusztavvargadr/windows-server-2019-standard
box_version: ${MOLECULE_VAGRANT_BOX_VERSION:-1809.0.2312}
box: StefanScherer/windows_2019
box_version: ${MOLECULE_VAGRANT_BOX_VERSION:-2021.05.15}
box_url: ${MOLECULE_VAGRANT_BOX_URL}
cpus: 2
memory: 4096
memory: 8192
provider_options:
gui: false
linked_clone: true
Expand All @@ -43,7 +43,7 @@ platforms:
box_version: ${MOLECULE_VAGRANT_BOX_VERSION:-2102.0.2312}
box_url: ${MOLECULE_VAGRANT_BOX_URL}
cpus: 2
memory: 4096
memory: 8192
provider_options:
gui: false
linked_clone: true
Expand Down