mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
[Scaleway] Add module to manage container registries (#5399)
* [Scaleway] Add module to manage container registries Signed-off-by: Lunik <lunik@tiwabbit.fr> * first review Signed-off-by: Lunik <lunik@tiwabbit.fr> * lint documentation on return value Signed-off-by: Lunik <lunik@tiwabbit.fr> * second review Signed-off-by: Lunik <lunik@tiwabbit.fr> * second review *bis Signed-off-by: Lunik <lunik@tiwabbit.fr> * second review *ter Signed-off-by: Lunik <lunik@tiwabbit.fr> * Fix typo. Signed-off-by: Lunik <lunik@tiwabbit.fr> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
91cac4c816
commit
2680739153
13 changed files with 805 additions and 0 deletions
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
####################################################################
|
||||
# WARNING: These are designed specifically for Ansible tests #
|
||||
# and should not be used as examples of how to write Ansible roles #
|
||||
####################################################################
|
||||
|
||||
# Copyright (c) 2022, Guillaume MARTINEZ <lunik@tiwabbit.fr>
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
- name: Create container_registry
|
||||
community.general.scaleway_container_registry:
|
||||
state: present
|
||||
name: '{{ name }}'
|
||||
region: '{{ scaleway_region }}'
|
||||
project_id: '{{ scw_project }}'
|
||||
description: '{{ description }}'
|
||||
|
||||
- name: Get container registry info
|
||||
community.general.scaleway_container_registry_info:
|
||||
name: '{{ name }}'
|
||||
region: '{{ scaleway_region }}'
|
||||
project_id: '{{ scw_project }}'
|
||||
register: cr_info_task
|
||||
|
||||
- ansible.builtin.debug:
|
||||
var: cr_info_task
|
||||
|
||||
- name: Check module call result
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- cr_info_task is success
|
||||
- cr_info_task is not changed
|
||||
|
||||
- name: Delete container registry
|
||||
community.general.scaleway_container_registry:
|
||||
state: absent
|
||||
name: '{{ name }}'
|
||||
region: '{{ scaleway_region }}'
|
||||
description: '{{ description }}'
|
||||
project_id: '{{ scw_project }}'
|
Loading…
Add table
Add a link
Reference in a new issue