-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsample.yml
59 lines (51 loc) · 1.27 KB
/
sample.yml
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
---
- name: Clone remote repository and push locall changes to Bitbucket repository
hosts: localhost
become: false
tasks:
- name: Clone repository
esp.bitbucket.bitbucket_clone:
username: '{{ bitbucket_username }}'
password: '{{ bitbucket_password }}'
repository: bar
project_key: FOO
branch: develop
path: /tmp/bar
force: yes
validate_certs: no
register: _result
- debug:
var: _result
- name: Create new files
ansible.builtin.file:
path: "/tmp/bar/{{ item }}"
state: touch
mode: u=rw,g=r,o=r
with_items:
- test_fe1.txt
- test_fe2.txt
- test_fe3.txt
- name: Commit changes to the local repository
esp.bitbucket.git_commit:
repository: bar
message: "Commit message"
path: /tmp/bar
committer:
name: jsmith
email: [email protected]
register: _result
- debug:
var: _result
- name: Push changes to the remote repository
esp.bitbucket.bitbucket_push:
username: '{{ bitbucket_username }}'
password: '{{ bitbucket_password }}'
repository: bar
project_key: FOO
path: /tmp/bar
commit: no
delete: no
validate_certs: no
register: _result
- debug:
var: _result