
    Vh`                     Z    d dl mZmZmZ eZdZdZdZd dl	m
Z
 d Zd Zedk(  r e        y	y	)
    )absolute_importdivisionprint_functionaN  
module: podman_runlabel
short_description: Run given label from given image
author: Pavel Dostal (@pdostal)
description:
  - podman container runlabel runs selected label from given image
options:
  image:
    description:
    - Image to get the label from.
    type: str
    required: true
  label:
    description:
    - Label to run.
    type: str
    required: true
  executable:
    description:
      - Path to C(podman) executable if it is not in the C($PATH) on the
        machine running C(podman)
    default: 'podman'
    type: str
requirements:
  - "Podman installed on host"

z
# What modules does for example
- containers.podman.podman_runlabel:
    image: docker.io/continuumio/miniconda3
    label: INSTALL
)AnsibleModulec                    d}|ddg}|j                  | j                  d          |j                  | j                  d          | j                  |      \  }}}|dk(  rd}n%| j                  d| j                  d   d	|
       |||fS )NF	containerrunlabellabelimager   Tz&Error running the runlabel from image z: )msg)appendparamsrun_command	fail_json)module
executablechangedcommandrcouterrs          u/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/containers/podman/plugins/modules/podman_runlabel.pyr
   r
   2   s    G;
3GNN6==)*NN6==)*%%g.LBS	QwMM'"C) 	*C    c            
         t        t        t        dd      t        dd      t        dd            d      } | j                  | j                  d	   d
      }t	        | |      \  }}}|||d} | j
                  di | y )NstrT)typerequiredpodman)r   default)r   r   r   F)argument_specsupports_check_moder   )r   )r   stdoutstderr )r   dictget_bin_pathr   r
   	exit_json)r   r   r   r   r   resultss         r   mainr*   @   s    ED1ED19

 "F $$V]]<%@4$PJ 4GS# G
 Fwr   __main__N)
__future__r   r   r   r   __metaclass__DOCUMENTATIONRETURNEXAMPLESansible.module_utils.basicr   r
   r*   __name__r%   r   r   <module>r3      sK    A @6
 5 * zF r   