File tree 9 files changed +45
-19
lines changed
9 files changed +45
-19
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ exclude_paths:
13
13
- .cache/ # implicit unless exclude_paths is defined in config
14
14
- test/fixtures/formatting-before/
15
15
- test/fixtures/formatting-prettier/
16
+ - .ansible/collections
16
17
# parseable: true
17
18
# quiet: true
18
19
# strict: true
Original file line number Diff line number Diff line change 49
49
run : |
50
50
exit_code=0
51
51
expected_exit_code=0
52
- ansible-lint || exit_code=$?
52
+ ansible-lint --ignore-file .ansible-lint-ignore --config-file .ansible-lint . || exit_code=$?
53
53
if [ "$exit_code" != "$expected_exit_code" ]; then echo "Command failed: got '$exit_code', expected '$expected_exit_code'"; exit 1; fi
54
54
55
55
molecule :
Original file line number Diff line number Diff line change @@ -13,26 +13,30 @@ None.
13
13
14
14
## Role install
15
15
16
- ```
16
+ ``` bash
17
17
ansible-galaxy role install bulch.rsync_server
18
18
```
19
19
20
20
## Role Variables
21
21
22
- Default varibles
22
+ Default varibles in file [ defaults/main.yml ] ( defaults/main.yml )
23
23
24
- ```
24
+ ``` yaml
25
+ ---
26
+ # defaults file for rsync_server
25
27
rsync_config_file : " /etc/rsyncd.conf"
26
28
rsync_config_port : 873
27
29
rsync_server_timeout : 300
28
30
rsync_server_max_connections : 2
31
+ rsync_packages :
32
+ - rsync
29
33
rsync_config_manage : []
30
34
` ` `
31
35
32
36
33
37
## Example Playbook
34
38
35
- ```
39
+ ` ` ` yaml
36
40
---
37
41
- name : Example Playbook
38
42
hosts : all
@@ -49,14 +53,14 @@ rsync_config_manage: []
49
53
- rsync_server
50
54
vars :
51
55
rsync_config_manage :
52
- - name: "example-storage"
53
- configs:
54
- comment: "Example storage"
55
- path: "/var/www/example-storage"
56
- hosts_allow: ["*"]
57
- secrets:
58
- user: "{{ my_secter_rsync_user }}"
59
- password: "{{ my_secter_rsync_password }}"
56
+ - name : " example-storage"
57
+ configs :
58
+ comment : " Example storage"
59
+ path : " /var/www/example-storage"
60
+ hosts_allow : ["*"]
61
+ secrets :
62
+ user : " {{ my_secter_rsync_user }}"
63
+ password : " {{ my_secter_rsync_password }}"
60
64
` ` `
61
65
62
66
Rsync list for test
Original file line number Diff line number Diff line change
1
+ ---
2
+
3
+ skip_list :
4
+ - ' var-naming'
5
+ - ' no-handler'
6
+ - ' 503' # no-handler code
7
+ - ' role-name'
8
+ - ' 106'
9
+ - ' ignore-errors'
10
+ - ' yaml'
11
+ - ' 204' # line length => checked by yamllint
12
+ - ' name[template]'
13
+ - ' run-once[play]' # only used in molecule
14
+ - ' run-once[task]' # only used in molecule
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : Fail if molecule group is missing
3
3
hosts : localhost
4
+ vars :
5
+ molecule_inventory :
6
+ all :
7
+ hosts : {}
8
+ molecule : {}
4
9
tasks :
5
10
- name : Print some info
6
11
ansible.builtin.debug :
Original file line number Diff line number Diff line change @@ -40,4 +40,4 @@ verifier:
40
40
lint : |
41
41
set -e
42
42
yamllint .
43
- ansible-lint .
43
+ ansible-lint
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : Fail if molecule group is missing
3
3
hosts : localhost
4
+ vars :
5
+ molecule_inventory :
6
+ all :
7
+ hosts : {}
8
+ molecule : {}
4
9
tasks :
5
10
- name : Print some info
6
11
ansible.builtin.debug :
Original file line number Diff line number Diff line change 1
1
---
2
2
roles : []
3
- collections :
4
- - name : community.docker
5
- version : " >=3.10.4"
6
- - name : community.general
3
+ collections : []
Original file line number Diff line number Diff line change 10
10
{% for item in rsync_config_manage | default ([]) %}
11
11
[{{ item.name }}]
12
12
path = {{ item.configs.path }}
13
- comment = {{ item.configs.comment | default("{{ item.name }} - server rsync") }}
13
+ comment = {{ item.configs.comment | default(item.name + " - server rsync") }}
14
14
auth users = {{ item.secrets.user }}
15
15
uid = {{ item.configs.uid | default('nobody') }}
16
16
gid = {{ item.configs.gid | default('nogroup') }}
You can’t perform that action at this time.
0 commit comments