Skip to content

Commit

Permalink
Merge branch 'main' into feature/molecule-gce-additional-disks
Browse files Browse the repository at this point in the history
  • Loading branch information
dfisiuk authored Oct 2, 2024
2 parents d4f334c + 36be097 commit 4d68251
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 15 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ack.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# See https://github.com/ansible-community/devtools/blob/main/.github/workflows/ack.yml
---
# See https://github.com/ansible/team-devtools/blob/main/.github/workflows/ack.yml
name: ack

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

on:
pull_request_target:
types: [opened, labeled, unlabeled, synchronize]

jobs:
ack:
uses: ansible-community/devtools/.github/workflows/ack.yml@main
uses: ansible/team-devtools/.github/workflows/ack.yml@main
5 changes: 3 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# See https://github.com/ansible-community/devtools/blob/main/.github/workflows/push.yml
---
# See https://github.com/ansible/team-devtools/blob/main/.github/workflows/push.yml
name: push
on:
push:
Expand All @@ -9,4 +10,4 @@ on:

jobs:
ack:
uses: ansible-community/devtools/.github/workflows/push.yml@main
uses: ansible/team-devtools/.github/workflows/push.yml@main
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: release

on:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tox.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: tox

# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
Expand Down Expand Up @@ -40,7 +41,8 @@ jobs:
matrix: ${{ fromJson(needs.pre.outputs.matrix) }}

steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # needed by setuptools-scm

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ This repository contains the following molecule plugins:
- podman
- vagrant


Installing `molecule-plugins` does not install dependencies specific to each,
plugin. To install these you need to install the extras for each plugin, like
`pip3 install 'molecule-plugins[azure]'`.
Expand Down
6 changes: 5 additions & 1 deletion src/molecule_plugins/podman/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from molecule import logger, util
from molecule.api import Driver, MoleculeRuntimeWarning
from molecule.constants import RC_SETUP_ERROR
from molecule.util import sysexit_with_message
from molecule.util import run_command, sysexit_with_message

log = logger.get_logger(__name__)

Expand Down Expand Up @@ -243,3 +243,7 @@ def sanity_checks(self):
def required_collections(self) -> dict[str, str]:
"""Return collections dict containing names and versions required."""
return {"containers.podman": "1.7.0", "ansible.posix": "1.3.0"}

def reset(self):
# keep `--filter` in sync with playbooks/create.yml
run_command(["podman", "rm", "--force", "--filter=label=owner=molecule"])
2 changes: 2 additions & 0 deletions src/molecule_plugins/podman/playbooks/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@
hostname: "{{ item.hostname | default(omit) }}"
image: "{{ item.pre_build_image | default(false) | ternary('', 'molecule_local/') }}{{ item.image }}"
ip: "{{ item.ip | default(omit) }}"
label:
owner: "molecule" # keep in sync with ../driver.py:Podman.reset()
network: "{{ item.network | default(omit) }}"
pid: "{{ item.pid_mode | default(omit) }}"
privileged: "{{ item.privileged | default(omit) }}"
Expand Down
8 changes: 4 additions & 4 deletions test/gce/scenarios/linux/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Requirements

- A GCE credentials rc file
- A GCE credentials rc file

## Install

Expand All @@ -11,9 +11,9 @@ installation best practices. If not using a virtual environment, please
consider passing the widely recommended ['--user' flag][] when invoking
`pip`.

``` bash
```bash
$ pip install 'molecule_gce'
```

[Virtual environment]: https://virtualenv.pypa.io/en/latest/
['--user' flag]: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site
[Virtual environment]: https://virtualenv.pypa.io/en/latest/
['--user' flag]: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site
8 changes: 4 additions & 4 deletions test/gce/scenarios/windows/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Requirements

- A GCE credentials rc file
- A GCE credentials rc file

## Install

Expand All @@ -11,9 +11,9 @@ installation best practices. If not using a virtual environment, please
consider passing the widely recommended ['--user' flag][] when invoking
`pip`.

``` bash
```bash
$ pip install 'molecule_gce'
```

[Virtual environment]: https://virtualenv.pypa.io/en/latest/
['--user' flag]: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site
[Virtual environment]: https://virtualenv.pypa.io/en/latest/
['--user' flag]: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site

0 comments on commit 4d68251

Please sign in to comment.