�
�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
m Z d d l m
Z
e 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: make
short_description: Run targets in a Makefile
requirements:
- make
version_added: "2.1"
author: Linus Unnebäck (@LinusU) <[email protected]>
description:
- Run targets in a Makefile.
options:
target:
description:
- The target to run.
- Typically this would be something like C(install),C(test) or C(all)."
type: str
params:
description:
- Any extra parameters to pass to make.
type: dict
chdir:
description:
- Change to this directory before running make.
type: path
required: true
file:
description:
- Use a custom Makefile.
type: path
version_added: '2.5'
s�
- name: Build the default target
make:
chdir: /home/ubuntu/cool-project
- name: Run 'install' target as root
make:
chdir: /home/ubuntu/cool-project
target: install
become: yes
- name: Build 'all' target with extra arguments
make:
chdir: /home/ubuntu/cool-project
target: all
params:
NUM_THREADS: 4
BACKEND: lapack
- name: Build 'all' target with a custom Makefile
make:
chdir: /home/ubuntu/cool-project
target: all
file: /some-project/Makefile
s # ( t iteritems( t
AnsibleModulec C` sD | j | d | d | j d �\ } } } | t | � t | � f S( s�
Run a command using the module, return
the result code and std{err,out} content.
:param command: list of command arguments
:param module: Ansible make module instance
:return: return code, stdout content, stderr content
t check_rct cwdt chdir( t run_commandt paramst sanitize_output( t commandt moduleR
t rct outt err( ( s? /usr/lib/python2.7/site-packages/ansible/modules/system/make.pyR
N s +c C` s! | d k r d S| j d � Sd S( s�
Sanitize the output string before we
pass it to module.fail_json. Defaults
the string to empty if it is None, else
strips trailing newlines.
:param output: output to sanitize
:return: sanitized output
t s
N( t Nonet rstrip( t output( ( s? /usr/lib/python2.7/site-packages/ansible/modules/system/make.pyR [ s
c C` s t d t d t d d � d t d d � d t d d d t � d
t d d � � d t � } | j d d t �} | s� | j d
d t �} n | j d } | j d d k r� g t | j d � D] \ } } | d t | � ^ q� } n g } | j d
d k r| d | j d
| g } n | | g } | j | � t
| d g | d t �\ } } } | j ru| d k }
n9 | d k r�t }
n$ t
| | d t �\ } } } t }
| j d |
d t d | d | d | j d d | j d d | j d d
| j d
� d S( Nt
argument_spect targett typet strR t dictR t patht requiredt filet supports_check_modet gmaket maket =s --files
--questionR
i t changedt failedt stdoutt stderr(
R R t Truet get_bin_patht FalseR R R R t extendR
t
check_modet exit_json( R t make_patht make_targett kt vt make_parameterst base_commandR R R R% ( ( s? /usr/lib/python2.7/site-packages/ansible/modules/system/make.pyt maink sF
=
%
t __main__N( t
__future__R R R R t
__metaclass__t ANSIBLE_METADATAt
DOCUMENTATIONt EXAMPLESt RETURNt ansible.module_utils.sixR t ansible.module_utils.basicR R) R
R R5 t __name__( ( ( s? /usr/lib/python2.7/site-packages/ansible/modules/system/make.pyt <module> s
>
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]