File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/macdefaults.cpython-310.pyc
Back
o ;j2 � @ sL d Z ddlZddlZe�e�ZdZdd� Zd dd�Z dd d �Z ddd�ZdS )z Set defaults on Mac OS � NZmacdefaultsc C s t jj�� rtS dS )z Only work on Mac OS F)�salt�utils�platformZ is_darwin�__virtualname__� r r �L/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/macdefaults.py�__virtual__ s r �stringc C sX |dks|dkr|du rd}n|du rd}d| � d|� d |� d |� d� }t d ||d �S )an Write a default to the system CLI Example: .. code-block:: bash salt '*' macdefaults.write com.apple.CrashReporter DialogType Server salt '*' macdefaults.write NSGlobalDomain ApplePersistence True type=bool domain The name of the domain to write to key The key of the given domain to write to value The value to write to the given key type The type of value to be written, valid types are string, data, int[eger], float, bool[ean], date, array, array-add, dict, dict-add user The user to write the defaults to �boolZbooleanTZTRUEFZFALSEzdefaults write "�" "z" -z "�"�cmd.run_all��runas�Z__salt__)�domain�key�value�type�user�cmdr r r �write s r c C s"