Skip to content

Commit

Permalink
Update devcontainer configuration and add molecule files (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
hspaans authored Dec 27, 2023
1 parent 2265f98 commit 4279ed1
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 57 deletions.
19 changes: 15 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Python 3",
"image": "mcr.microsoft.com/devcontainers/python:0-3.9",
"image": "mcr.microsoft.com/devcontainers/python:3.10",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers-contrib/features/ansible:2": {},
Expand All @@ -10,8 +10,19 @@
"customizations": {
"vscode": {
"extensions": [
"redhat.ansible"
]
"EditorConfig.EditorConfig",
"ms-python.autopep8",
"ms-python.flake8",
"redhat.ansible",
"redhat.vscode-yaml"
],
"[python]": {
"editor.defaultFormatter": "ms-python.autopep8",
"editor.formatOnSave": true
},
"ansible.python.interpreterPath": "/usr/local/bin/python",
"python.formatting.provider": "none"
}
}
},
"postCreateCommand": "pip install -r requirements.txt"
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
## Python
.pytest_cache/
__pycache__/
*.py[cod]
*.py[codz]
*$py.class
pytestdebug.log
36 changes: 33 additions & 3 deletions molecule/debian/molecule.yml → molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ lint: |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
platforms:
- name: debian-10
image: "ghcr.io/hspaans/molecule-container-debian:10"
image: "ghcr.io/hspaans/molecule-containers:debian-10"
command: ""
cgroupns_mode: host
tmpfs:
Expand All @@ -23,8 +23,9 @@ platforms:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
pre_build_image: true

- name: debian-11
image: "ghcr.io/hspaans/molecule-container-debian:11"
image: "ghcr.io/hspaans/molecule-containers:debian-11"
command: ""
cgroupns_mode: host
tmpfs:
Expand All @@ -34,8 +35,9 @@ platforms:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
pre_build_image: true

- name: debian-12
image: "ghcr.io/hspaans/molecule-container-debian:12"
image: "ghcr.io/hspaans/molecule-containers:debian-12"
command: ""
cgroupns_mode: host
tmpfs:
Expand All @@ -45,6 +47,34 @@ platforms:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
pre_build_image: true

- name: ubuntu-20.04
image: "ghcr.io/hspaans/molecule-containers:ubuntu-20.04"
command: ""
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
pre_build_image: true

- name: ubuntu-22.04
image: "ghcr.io/hspaans/molecule-containers:ubuntu-22.04"
command: ""
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
pre_build_image: true

- name: ubuntu-24.04
image: "ghcr.io/hspaans/molecule-containers:ubuntu-24.04"
command: ""
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
pre_build_image: true

provisioner:
name: ansible
playbooks:
Expand Down
49 changes: 0 additions & 49 deletions molecule/ubuntu/molecule.yml

This file was deleted.

3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ansible-lint==6.22.1
pytest==7.4.3
pytest-testinfra==10.0.0

0 comments on commit 4279ed1

Please sign in to comment.