??????????????
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 d
l Z d d
l
Z
d d
l Z d d l m
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_bys7
---
module: alternatives
short_description: Manages alternative programs for common commands
description:
- Manages symbolic links using the 'update-alternatives' tool.
- Useful when multiple programs are installed but provide similar functionality (e.g. different editors).
version_added: "1.6"
author:
- David Wittman (@DavidWittman)
- Gabe Mulley (@mulby)
options:
name:
description:
- The generic name of the link.
type: str
required: true
path:
description:
- The path to the real executable that the link should point to.
type: path
required: true
link:
description:
- The path to the symbolic link that should point to the real executable.
- This option is always required on RHEL-based distributions. On Debian-based distributions this option is
required when the alternative I(name) is unknown to the system.
type: path
priority:
description:
- The priority of the alternative.
type: int
default: 50
version_added: "2.2"
requirements: [ update-alternatives ]
sª
- name: Correct java version selected
alternatives:
name: java
path: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
- name: Alternatives link created
alternatives:
name: hadoop-conf
link: /etc/hadoop/conf
path: /etc/hadoop/conf.ansible
- name: Make java 32 bit an alternative with low priority
alternatives:
name: java
path: /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java
priority: -10
N( t
AnsibleModulec C` sí t d t d t d d d t ƒ d t d d d t ƒ d t d d ƒ d t d d d
d ƒ ƒ d t ƒ } | j } | d } | d } | d } | d } | j d
t ƒ } d } g } | j d d | d | g ƒ \ } }
} | d k rÄt j d t j ƒ } t j d t j ƒ }
| j
|
ƒ } | r9| j d ƒ } n |
j |
ƒ } | sÄ| j d d | d | g ƒ \ } } } | d k rÁx: | j
ƒ D]) } | j d ƒ rŽ| j ƒ d } PqŽqŽWqÁqÄn | | k rÙ| j rò| j d t d | ƒ n y¯ | | k rqt j j | ƒ s*| j d d | ƒ n | sC| j d d ƒ n | j | d | | | t | ƒ g d t ƒn | j | d | | g d t ƒ| j d t ƒ Wqét j k
rÕ} | j d t t | ƒ ƒ ƒ qéXn | j d t ƒ d S( Nt
argument_spect namet typet strt requiredt patht linkt priorityt intt defaulti2 t supports_check_modes update-alternativest envs LC_ALL=Cs --displayi s" ^\s*link currently points to (.*)$s ^(\/.*)\s-\spriorityi s --querys Link:t changedt current_patht msgs Specified path %s does not existsQ Needed to install the alternative, but unable to do so as we are missing the links --installt check_rcs --set( R t dictt Truet paramst get_bin_patht Nonet run_commandt ret compilet MULTILINEt searcht groupt findallt
splitlinest
startswitht splitt
check_modet exit_jsont osR t existst fail_jsonR t
subprocesst CalledProcessErrort dirt False( t moduleR R
R R R t UPDATE_ALTERNATIVESR t all_alternativest rct display_outputt _t current_path_regext alternative_regext matcht query_outputt linet cpe( ( sG /usr/lib/python2.7/site-packages/ansible/modules/system/alternatives.pyt mainP sh
! !
#t __main__( t
__future__R R R R t
__metaclass__t ANSIBLE_METADATAt
DOCUMENTATIONt EXAMPLESR* R R- t ansible.module_utils.basicR R= t __name__( ( ( sG /usr/lib/python2.7/site-packages/ansible/modules/system/alternatives.pyt s
& U