File tree 8 files changed +18
-18
lines changed
8 files changed +18
-18
lines changed Original file line number Diff line number Diff line change 1
1
# handlers file
2
2
---
3
3
- name : restart haproxy
4
- service :
4
+ ansible.builtin. service :
5
5
name : haproxy
6
6
state : " {{ haproxy_restart_handler_state }}"
7
7
when : service_default_state | default('started') == 'started'
Original file line number Diff line number Diff line change 4
4
become : true
5
5
pre_tasks :
6
6
- name : include vars
7
- include_vars : " {{ playbook_dir }}/../../tests/vars/main.yml"
7
+ ansible.builtin. include_vars : " {{ playbook_dir }}/../../tests/vars/main.yml"
8
8
roles :
9
9
- ../../../
Original file line number Diff line number Diff line change 1
1
# tasks file
2
2
---
3
3
- name : acl | create directories
4
- file :
4
+ ansible.builtin. file :
5
5
path : " {{ item.dest | dirname }}"
6
6
state : directory
7
7
owner : " {{ item.owner | default('root') }}"
12
12
- haproxy-acl-create-directories
13
13
14
14
- name : acl | update files
15
- template :
15
+ ansible.builtin. template :
16
16
src : etc/haproxy/acl.j2
17
17
dest : " {{ item.dest }}"
18
18
owner : " {{ item.owner | default('root') }}"
Original file line number Diff line number Diff line change 1
1
# tasks file
2
2
---
3
3
- name : certificates | create directories
4
- file :
4
+ ansible.builtin. file :
5
5
path : " {{ item.dest | dirname }}"
6
6
state : directory
7
7
owner : " {{ item.owner | default('root') }}"
13
13
- haproxy-certificates-create-directories
14
14
15
15
- name : certificates | copy files
16
- copy :
16
+ ansible.builtin. copy :
17
17
src : " {{ item.src }}"
18
18
dest : " {{ item.dest }}"
19
19
owner : " {{ item.owner | default('root') }}"
26
26
- haproxy-certificates-copy-files
27
27
28
28
- name : certificates | remove files
29
- file :
29
+ ansible.builtin. file :
30
30
path : " {{ item.dest }}"
31
31
state : absent
32
32
with_items : " {{ haproxy_ssl_map }}"
Original file line number Diff line number Diff line change 1
1
# tasks file
2
2
---
3
3
- name : configuration | warn or fail
4
- fail :
4
+ ansible.builtin. fail :
5
5
msg : " haproxy_global_nbproc is deprecated"
6
6
ignore_errors : " {{ haproxy_version is version('2.5', '<') }}"
7
7
when :
11
11
- haproxy-configuration-warn-or-fail
12
12
13
13
- name : configuration | update file
14
- template :
14
+ ansible.builtin. template :
15
15
src : " {{ haproxy_conf_template }}"
16
16
dest : /etc/haproxy/haproxy.cfg
17
17
owner : root
Original file line number Diff line number Diff line change 1
1
# tasks file
2
2
---
3
3
- name : install | dependencies (pre)
4
- apt :
4
+ ansible.builtin. apt :
5
5
name : " {{ haproxy_dependencies_pre }}"
6
6
state : " {{ apt_install_state | default('latest') }}"
7
7
update_cache : true
10
10
- haproxy-repository-install-dependencies
11
11
12
12
- name : install | add repository from PPA and install its signing key
13
- apt_repository :
13
+ ansible.builtin. apt_repository :
14
14
repo : " {{ haproxy_ppa }}"
15
15
update_cache : true
16
16
when : haproxy_use_ppa | bool
17
17
tags :
18
18
- haproxy-install-add-repository
19
19
20
20
- name : install | dependencies
21
- apt :
21
+ ansible.builtin. apt :
22
22
name : " {{ item.name }}"
23
23
state : " {{ item.state }}"
24
24
with_items : " {{ haproxy_dependencies }}"
25
25
tags :
26
26
- haproxy-install-dependencies
27
27
28
28
- name : install | additional
29
- apt :
29
+ ansible.builtin. apt :
30
30
name : " {{ haproxy_install }}"
31
31
state : " {{ apt_install_state | default('latest') }}"
32
32
tags :
Original file line number Diff line number Diff line change 1
1
# tasks file
2
2
---
3
3
- name : letsencrypt | copy SSL deploy script
4
- template :
4
+ ansible.builtin. template :
5
5
src : " {{ haproxy_letsencrypt_ssl_deploy_template }}"
6
6
dest : " {{ haproxy_letsencrypt_ssl_deploy }}"
7
7
owner : root
11
11
- haproxy-letsencrypt-ssl-deploy
12
12
13
13
- name : letsencrypt | copy OCSP deploy script
14
- template :
14
+ ansible.builtin. template :
15
15
src : " {{ haproxy_letsencrypt_ocsp_deploy_template }}"
16
16
dest : " {{ haproxy_letsencrypt_ocsp_deploy }}"
17
17
owner : root
21
21
- haproxy-letsencrypt-ocsp-deploy
22
22
23
23
- name : letsencrypt | configure (cron) job for OCSP deploy
24
- cron :
24
+ ansible.builtin. cron :
25
25
name : haproxy-letsencrypt-ocsp-deploy
26
26
job : " {{ haproxy_letsencrypt_ocsp_deploy }}"
27
27
state : " {{ haproxy_letsencrypt_ocsp_deploy_job.state | default('absent') }}"
Original file line number Diff line number Diff line change 1
1
# tasks file
2
2
---
3
3
- name : check version support
4
- fail :
4
+ ansible.builtin. fail :
5
5
msg : " HAProxy version {{ haproxy_version }} is not supported"
6
6
when : haproxy_version | string not in haproxy_versions_supported
7
7
tags :
40
40
- haproxy-letsencrypt
41
41
42
42
- name : start and enable service
43
- service :
43
+ ansible.builtin. service :
44
44
name : haproxy
45
45
state : " {{ service_default_state | default('started') }}"
46
46
enabled : " {{ service_default_enabled | default(true) | bool }}"
You can’t perform that action at this time.
0 commit comments