1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-02-04 07:11:49 +00:00
Commit graph

74 commits

Author SHA1 Message Date
dependabot[bot]
552af3ef7f
Bump actions/checkout from 3 to 4 (#822)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-20 16:57:49 +03:00
dependabot[bot]
ebc6f13c07
Bump actions/setup-python from 4 to 5 (#821)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-20 16:57:31 +03:00
dependabot[bot]
5bbc06a26c
Bump actions/cache from 3 to 4 (#823)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-20 16:57:13 +03:00
Alessandro Rossi
eb46429493
Add podman_container_copy module (#813)
Signed-off-by: kubealex <al.rossi87@gmail.com>
2024-08-13 12:56:47 +03:00
Sergey
f9aa8878fd
CI: Update python for latest Ansible to 3.11 in CI (#789)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-06-19 10:46:22 +03:00
Sergey
680b9a9309
Upgrade Python version for latest Ansible (#786)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-06-19 10:18:45 +03:00
Sergey
98dd70ae74
Add CI job for Podman search module (#772)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-06-03 09:54:20 +03:00
Sergey
a9e92c902b
Add CI jobs for changes in Quadlet file (#749)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-19 22:41:22 +03:00
Sergey
da420f96d9
Add secrets info module (#706)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-01-29 00:14:51 +02:00
dependabot[bot]
a6ece472c4
Bump actions/cache from 3 to 4 (#704)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-23 11:29:53 +02:00
Sergey
5ee4dd1eda
Fix broken conmon version in CI install (#695)
Podman issue:
https://github.com/containers/podman/issues/21024

Conmon issue:
https://github.com/containers/conmon/issues/475

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-12-23 13:20:01 +02:00
dependabot[bot]
45893f4a7b
Bump actions/setup-python from 4 to 5 (#688)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-11 18:40:25 +02:00
dependabot[bot]
65d9d49aa4
Bump actions/checkout from 3 to 4 (#641)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 11:29:22 +03:00
Sergey
e42e11c714
Add CI for runlabel testing (#630)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-23 00:03:50 +03:00
nishipy
bc3670f8dc
Add podman_container_exec module (#627)
* Add podman_container_exec

Signed-off-by: nishipy <goodisonev4@gmail.com>

* Update podman_container_exec

Signed-off-by: nishipy <goodisonev4@gmail.com>

* Add tests for podman_container_exec

Signed-off-by: nishipy <goodisonev4@gmail.com>

* Update examples for podman_container_exec

Signed-off-by: nishipy <goodisonev4@gmail.com>

* Fix CI errors

Signed-off-by: nishipy <goodisonev4@gmail.com>

* Fix CI errors

Signed-off-by: nishipy <goodisonev4@gmail.com>

* Fix typo

Signed-off-by: nishipy <goodisonev4@gmail.com>

* Add workflow for podman_container_exec

Signed-off-by: nishipy <goodisonev4@gmail.com>

* Fix python version in the workflow for podman_container_exec

Signed-off-by: nishipy <goodisonev4@gmail.com>

* Fix python version in the workflow for podman_container_exec

Signed-off-by: nishipy <goodisonev4@gmail.com>

---------

Signed-off-by: nishipy <goodisonev4@gmail.com>
2023-08-22 18:52:07 +03:00
Sergey
0932809c6a
Set Python >=3.10 for Ansible 2.16 (#602)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-07-11 20:32:53 +03:00
Sergey
e3000939ef
Fix python versions for CI, drop 2.7 job (#601)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-07-10 15:06:45 +03:00
Roberto Alfieri
7d1d016fe9
added podman_prune module (#538)
* added podman-prune module


---------

Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
Signed-off-by: Roberto Alfieri <me@rebtoor.com>
2023-01-31 02:22:57 +02:00
Sergey
73af4896b4
Prepare CI for Podman v3 backward compatibility (#528)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-11-29 02:49:27 +02:00
Sergey
4f6ed89607
Run CI jobs with newer podman 4 (#525)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-11-29 00:02:24 +02:00
dependabot[bot]
83632441b0
Bump actions/cache from 1 to 3 (#511)
Bumps [actions/cache](https://github.com/actions/cache) from 1 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v1...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-14 18:37:12 +02:00
Sergey
c952149603
Add unittests for Ansible Podman modules (#504)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-10-31 23:16:45 +02:00
CyberFox001
6cf118e7a9
Podman generate systemd (#498)
* Start a new Ansible module: podman_generate_systemd

This module, when finished, will let user generate a systemd .service
unit file from a pod or a container.

If a pod is specified, then the .service file is made for the pod and
its containers.

This commit is only the beginning, with two empty functions and the
base for a Python script.

* podman_generate_systemd : Remove not needed import from __future__

* podman_generate_systemd : Import AnsibleModule and json

* podman_generate_systemd : Build podman comand from user parameters

* podman_generate_systemd : Run the podman command and manage error

* podman_generate_systemd : Manage writing of systemd files, if needed

* podman_generate_systemd : In generate_systemd(), return needed infos

In case of success in generate_systemd() function, return:
- A boolean, indicate if the state of the target systemd is modified
- A copy of the systemd unit content

* podman_generate_systemd : Write run_module() function

This function:
- Build the list of parameters user can use
- Build a default result dictionary
- Build the Ansible Module
- Generate the systemd units (with generate_systemd())
- Return the result, with module.exit_json

* podman_generate_systemd : In main(), call run_module()

* podman_generate_systemd: Return podman command, and remove debug param

The run podman command is now returned by the module, and the "debug"
option is removed.

* podman_generate_systemd: Use more direct #! to python interpreter

The run podman command is now returned by the module, and the "debug"
option is removed.

* podman_generate_systemd: Write DOCUMENTATION variable

* podman_generate_systemd: Write EXAMPLES variable

* podman_generate_systemd: Write RETURN variable

* podman_generate_systemd: Fix typo

* podman_generate_systemd: 'restart_policy, remove default

* podman_generate_systemd: Fix missing "command" return when error

When error in command execution, generate_systemd() was not returning
the command. Now it's done.

* podman_generate_systemd: Remove unnecessary return in case of fail

In generate_systemd(), in case of fail in executing the podman
command, we call module.fail_json() then we return the usual data of
generate_systemd() function.

But module.fail_json() will stop the execution of the module, so it's
not necessary to return a value from generate_systemd() after calling
module.fail_json().

* podman_generate_systemd: Remove TODO

* podman_generate_systemd: Add missing double lines between functions

* podman_generate_systemd: More readability in EXAMPLES variable

* podman_generate_systemd: EXAMPLES, add minimum podman version

When a module option require a minimum Podman version, I indicate
this required version in option description.

For example: The module option `start_timeout` use the Podman option
`--start-timout`, which was introduced in Podman 4.0.0. So, I add in
the description of `start_timeout`: Only with Podman 4.0.0 and above

Options with this information:
- start_timeout
- restart_sec
- wants
- after
- requires

* podman_generate_systemd: EXAMPLES, fix type

* podman_generate_systemd: Simpler code for wants, after and requires

`after`, `wants` and `requires` are of type list. So, no need to
test their type and manage the case where they are of type string.

* podman_generate_systemd, generate_systemd(): Improve returned command

Improve how the used Podman command, returned by generate_systemd(),
is built. Instead of print a list in a formatted string, I join the
list elements with a space char as separator.

* podman_generate_systemd: Add support for the `env` option

Add, to the podman_generate_systemd module, the support for the `env`
option. This commit include the code, the option definition for the
module, the modification of the DOCUMENTATION variable and the add of
an usage example of this new option in the EXAMPLE variable.

* podman_generate_systemd: Write the integration test

* generate_systemd: Fix of the integration test and the --env command option

On the module, I now use the command option `-e=` for the definition
of environment variables. Because the option `--env` give an error
from Podman.

Also, fix errors in the integration test for this module.

* podman_generate_systemd: Add __future__ and __metaclass__ in the module

* podman_generate_systemd: Add author github ID

* podman_generate_systemd: Use argspec type path instead of str for dest option

In the module argspec, I now use the type `path` instead of `str` for
the option `dest`. `os.path.expanduser()` is no more necessary.

* podman_generate_systemd: remove all trailing whitespaces

* podman_generate_systemd: Remove type hint for compatibility with older Python

* podman_generate_systemd: Fix Documentation

Add a default for option `new` and fix typo in `use_names` option name.

* podman_generate_systemd: restart_policy option, new choices

The choice `no` is replaced by `no-restart`

* podman_generate_systemd: dest option in documentation, set type as path

Instead of str

* DNM add CI bits for new module tests

Made by sshnaidm.

* podman_generate_systemd: Better use of fail_json()

First: When calling the method fail_json(), name the `msg` argument to
avoid confusion.

Second: In case of calling fail_json(), I now return the same
arguments than the ones returned by a success: `changed`,
`systemd_units` and `podman_command`.

For future refactoring: Instead of calling fail_json() inside
generate_systemd(), raise custom exceptions and manage calling
fail_json() or exit_json() outside of generate_systemd().

* podman_generate_systemd: Add utf-8

* podman_generate_systemd: Remove `required: false` for DOCUMENTATION var

* podman_generate_systemd: DOCUMENTATION var, use bool instead of yes/no

* podman_generate_systemd: Remove non-necessary check of restart_policy option

The possible choices for this options are set in `ansible_spec` and
will be checked by AnsibleModule code. So, no need to check manually:
`ansible_spec` won't be anything other that the possible choices.

* podman_generate_systemd: On module params, use direct access to dict

Use `module.params['']` instead of `module.params.get('')`.

Because all module's options are defined with the `argument_spec`, the
options used here exist in the params. And if the user don't set
them, the value of the option is `None`.

* podman_generate_systemd: use shlex join for command_str

* podman_generate_systemd: use same quotes for messages

* podman_generate_systemd: Replace f-strings with .format(), for Python 2

* podman_generate_systemd: Revert usage of shlex

It add weird quotes around command options like `-e='ENV_VAR=value'`.

* podman_generate_systemd: Podman command build, more Python 2 compatible

Don't use any more the asterisk to add command options to the command.

* podman_generate_systemd: Better check-mode management

Now, when check mode is enabled, the module report "changed" is
something would be changed, but w/o actually doing anything.

* podman_generate_systemd: remove all trailing whitespaces

Co-authored-by: Sébastien Gendre <seb@k-7.ch>
2022-10-31 20:51:29 +02:00
dependabot[bot]
9531d15d24
Bump actions/upload-artifact from 1 to 3 (#496)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 1 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v1...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-25 04:42:06 +03:00
dependabot[bot]
9fe0771f4e
Bump actions/setup-python from 2 to 4 (#497)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-25 04:41:31 +03:00
dependabot[bot]
6219c8cb34
Bump actions/checkout from 2 to 3 (#495)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-25 04:39:54 +03:00
dependabot[bot]
3e71b76b2e
Bump actions/download-artifact from 1 to 3 (#494)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 1 to 3.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v1...v3)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-25 04:39:26 +03:00
Sergey
ff60aed673
Set devel Ansible branch to run on Python 3.9 (#457)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-07-22 12:14:47 +03:00
Sagi Shnaidman
3fe1edb5b4 Run CI on Ubuntu 22.04
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-07-01 10:23:12 +03:00
Sergey
2cc1040f33
Use 2.13 Ansible version in CI jobs instead of 2.11 (#439)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-06-28 01:04:56 +03:00
Sergey
05515e8307
Add CI jobs and docs for podman_tag (#347) 2021-11-28 22:31:18 +02:00
Sergey
b6c20717ae
Fix CI issues with Ansible 2.12 version (#315) 2021-10-03 00:15:20 +03:00
Sergey
b2541ad39c
Change python version for ansible-core to 3.9 (#311) 2021-09-22 12:08:21 +03:00
Sergey
53338e7ec0
Add podman import/export containers modules (#297) 2021-09-12 17:01:38 +03:00
Sergey
ff4e26bbac
Podman image load module (#296) 2021-09-06 02:42:34 +03:00
Sergey
0dd471070a
Podman save module (#295) 2021-09-06 01:36:52 +03:00
Sergey
d13fe1f850
Run tests with podman secret (#287) 2021-08-15 20:04:51 +03:00
Sergey
1c0a167a1d
Add Podman play kube module (#244)
* Add Podman play kube module
* Add tests
2021-05-12 16:52:42 +03:00
Sergey
ba763e2988
Add Ansible 2.11 to all tests and use Ubuntu 20.04 (#243) 2021-04-07 11:13:58 +03:00
Sergey
ecd50a7874
Add Ansible 2.11 to testing (#242) 2021-04-07 10:50:03 +03:00
Sergey
16ab958a3a
Add CI for podman_login module (#237) 2021-04-05 20:41:53 +03:00
Sergey
9f45c40ea9
Fix podman_pod* modules for Podman v3 (#207)
Fix network in podman_pod modules for Podman v3
2021-02-23 15:57:25 +02:00
Sergey
44d266dc3e
Change Ubuntu 16 to latest in connection tests (#206) 2021-02-23 01:23:27 +02:00
Sagi Shnaidman
3204bb2c23 Fix CI for various Python versions 2021-02-14 08:00:49 +02:00
Sagi Shnaidman
cd652fe2ee Remove 'detach' when creating container 2020-12-20 18:30:17 +02:00
Sergey
2a84642c3f
Add podman_containers module for multiple containers (#141) 2020-12-13 20:59:07 +02:00
Clemens Lange
92389abff2
Add podman_login_info module (#133)
related to #93
2020-10-26 17:32:39 +02:00
Clemens Lange
05746224e0
Add podman logout module (#134)
* Add podman logout module
* Add more tests
* Fix output string comparison (due to podman inconsistency)
* Fix copy and paste error
* Use full module path and name
Fix #94
2020-10-26 15:22:38 +02:00
Sergey
297995540b
Add jobs for Ansible 2.10 and 2.11 releases (#124) 2020-10-18 22:47:41 +03:00
Sergey
c97a56a0a2
Add podman_network module (#107)
And add release 1.3.0
2020-09-03 01:38:25 +03:00