File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/sdb/__pycache__/consul.cpython-310.pyc
Back
o ;j� � @ s` d Z ddlmZ zddlZdZW n ey dZY nw ddiZd dd�Zd d d �Zdd� Z dS )a� Consul sdb Module :maintainer: SaltStack :maturity: New :platform: all This module allows access to Consul using an ``sdb://`` URI Like all sdb modules, the Consul module requires a configuration profile to be configured in either the minion or master configuration file. This profile requires very little. For example: .. code-block:: yaml myconsul: driver: consul host: 127.0.0.1 port: 8500 token: b6376760-a8bb-edd5-fcda-33bc13bfc556 scheme: http consistency: default dc: dev verify: True The ``driver`` refers to the Consul module, all other options are optional. For option details see: https://python-consul.readthedocs.io/en/latest/#consul � )�CommandExecutionErrorNTF�set_�setc C s |sdS t |�}|j�| |�S )NF)�get_conn�kv�put)�key�value�profile�conn� r �C/opt/saltstack/salt/lib/python3.10/site-packages/salt/sdb/consul.pyr + s c C s0 |sdS t |�}|j�| �\}}|r|d S d S )NFZValue)r r �get)r r r �_�resultr r r r 4 s r c C s>