
    Vh                    ^    d dl mZ dZd dlZd dlZd dlmZ d dlmZ d dl	m
Z
  G d de
      Zy)	    )annotationsa  
name: yaml
short_description: YAML formatted files
description:
  - This cache uses YAML formatted, per host, files saved to the filesystem.
author: Brian Coca (@bcoca)
options:
  _uri:
    required: true
    description:
      - Path in which the cache plugin will save the files.
    env:
      - name: ANSIBLE_CACHE_PLUGIN_CONNECTION
    ini:
      - key: fact_caching_connection
        section: defaults
    type: string
  _prefix:
    description: User defined prefix to use when creating the files.
    env:
      - name: ANSIBLE_CACHE_PLUGIN_PREFIX
    ini:
      - key: fact_caching_prefix
        section: defaults
    type: string
  _timeout:
    default: 86400
    description: Expiration timeout in seconds for the cache plugin data. Set to 0 to never expire.
    env:
      - name: ANSIBLE_CACHE_PLUGIN_TIMEOUT
    ini:
      - key: fact_caching_timeout
        section: defaults
    type: integer
        # TODO: determine whether it is OK to change to: type: float
N)AnsibleLoader)AnsibleDumper)BaseFileCacheModulec                      e Zd ZdZd Zd Zy)CacheModulez0
    A caching module backed by yaml files.
    c                    t        j                  |dd      5 }t        |      j                         cd d d        S # 1 sw Y   y xY w)Nrutf-8encoding)codecsopenr   get_single_data)selffilepathfs      h/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/community/general/plugins/cache/yaml.py_loadzCacheModule._load>   s:    [[39 	6Q #335	6 	6 	6s	   <Ac                    t        j                  |dd      5 }t        j                  ||t        d       d d d        y # 1 sw Y   y xY w)Nwr   r   F)Dumperdefault_flow_style)r   r   yamldumpr   )r   valuer   r   s       r   _dumpzCacheModule._dumpB   s?    [[39 	PQIIeQ}O	P 	P 	Ps   A  A	N)__name__
__module____qualname____doc__r   r        r   r   r   9   s    6Pr#   r   )
__future__r   DOCUMENTATIONr   r   ansible.parsing.yaml.loaderr   ansible.parsing.yaml.dumperr   ansible.plugins.cacher   r   r"   r#   r   <module>r)      s2    ##L   5 5 5P% Pr#   