-
Notifications
You must be signed in to change notification settings - Fork 29
/
win_git.py
72 lines (67 loc) · 1.65 KB
/
win_git.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/python
# -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Anatoliy Ivashina <[email protected]>
# Pablo Estigarribia <[email protected]>
# Michael Hay <[email protected]>
DOCUMENTATION = r'''
---
module: win_git
version_added: "2.0"
short_description: Deploy software (or files) from git checkouts
description:
- Deploy software (or files) from git checkouts
- SSH only
notes:
- git for Windows need to be installed
- SSH only
options:
repo:
description:
- address of the repository
required: true
aliases: [ name ]
dest:
description:
- destination folder
required: true
replace_dest:
description:
- replace destination folder if exists (recursive!)
required: false
default: false
accept_hostkey:
description:
- add hostkey to known_hosts (before connecting to git)
required: false
default: false
update:
description:
- do we want to update the repo (use git pull origin branch)
required: false
default: false
recursive:
description:
- if C(no), repository will be cloned without the --recursive option, skipping sub-modules
type: bool
default: 'yes'
branch:
description:
- branch to update / clone the repo
required: false
default: master
author:
- Anatoliy Ivashina
- Pablo Estigarribia
- Michael Hay
'''
EXAMPLES = r'''
# git clone cool-thing.
win_git:
repo: "[email protected]:tivrobo/Ansible-win_git.git"
dest: "{{ ansible_env.TEMP }}\\Ansible-win_git"
branch: master
update: no
replace_dest: no
accept_hostkey: yes
'''