??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
Udac @` s d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
Z
d d l Z d d l m
Z
d
Z d Z d Z d Z d Z d Z d Z d Z d Z e d k r e n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bys
---
module: snap
short_description: Manages snaps
version_added: "2.8"
description:
- "Manages snaps packages."
options:
name:
description:
- Name of the snap to install or remove. Can be a list of snaps.
required: true
state:
description:
- Desired state of the package.
required: false
default: present
choices: [ absent, present ]
classic:
description:
- Confinement policy. The classic confinement allows a snap to have
the same level of access to the system as "classic" packages,
like those managed by APT. This option corresponds to the --classic argument.
This option can only be specified if there is a single snap in the task.
type: bool
required: false
default: False
channel:
description:
- Define which release of a snap is installed and tracked for updates.
This option can only be specified if there is a single snap in the task.
type: str
required: false
default: stable
author:
- Victor Carceler (@vcarceler)
- Stanislas Lange (@angristan)
s
# Install "foo" and "bar" snap
- name: Install foo
snap:
name:
- foo
- bar
# Remove "foo" snap
- name: Remove foo
snap:
name: foo
state: absent
# Install a snap with classic confinement
- name: Install "foo" with option --classic
snap:
name: foo
classic: yes
# Install a snap with from a specific channel
- name: Install "foo" with option --channel=latest/edge
snap:
name: foo
channel: latest/edge
s
classic:
description: Whether or not the snaps were installed with the classic confinement
type: bool
returned: When snaps are installed
channel:
description: The channel the snaps were installed from
type: str
returned: When snaps are installed
cmd:
description: The command that was executed on the host
type: str
returned: When changed is true
snaps_installed:
description: The list of actually installed snaps
type: list
returned: When any snaps have been installed
snaps_removed:
description: The list of actually removed snaps
type: list
returned: When any snaps have been removed
N( t
AnsibleModulec C` sB x; | j d D], } t | | s | j d d | q q Wd S( s Ensure that all exist.t namet msgs No snap matching '%s' available.N( t paramst snap_existst fail_json( t modulet snap_name( ( sE /usr/lib/python2.7/site-packages/ansible/modules/packaging/os/snap.pyt validate_input_snapsv s c C` sX | j d t } | d | g } d j | } | j | d t \ } } } | d k S( Nt snapt infot t check_rci ( t get_bin_patht Truet joint run_commandt False( R R t snap_patht cmd_partst cmdt rct outt err( ( sE /usr/lib/python2.7/site-packages/ansible/modules/packaging/os/snap.pyR } s
c C` sX | j d t } | d | g } d j | } | j | d t \ } } } | d k S( NR t listR R i ( R R R R R ( R R R R R R R R ( ( sE /usr/lib/python2.7/site-packages/ansible/modules/packaging/os/snap.pyt is_snap_installed s
c ` sj j d } j d d k } | r/ t j n t f d } g | D] } | | rN | ^ qN S( s4 Construct a list of snaps to use for current action.R t statet presentc ` s t | S( N( R! ( t s( R t negation_predicate( sE /usr/lib/python2.7/site-packages/ansible/modules/packaging/os/snap.pyt predicate s ( R t operatort not_t bool( R t snapst is_present_stateR&