Skip to content

Commit 827344b

Browse files
committed
Use FQCN for builtin actions
Fixes all ansible-lint errors.
1 parent 9a03e65 commit 827344b

File tree

8 files changed

+18
-18
lines changed

8 files changed

+18
-18
lines changed

handlers/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# handlers file
22
---
33
- name: restart haproxy
4-
service:
4+
ansible.builtin.service:
55
name: haproxy
66
state: "{{ haproxy_restart_handler_state }}"
77
when: service_default_state | default('started') == 'started'

molecule/default/converge.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
become: true
55
pre_tasks:
66
- name: include vars
7-
include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"
7+
ansible.builtin.include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"
88
roles:
99
- ../../../

tasks/acl.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# tasks file
22
---
33
- name: acl | create directories
4-
file:
4+
ansible.builtin.file:
55
path: "{{ item.dest | dirname }}"
66
state: directory
77
owner: "{{ item.owner | default('root') }}"
@@ -12,7 +12,7 @@
1212
- haproxy-acl-create-directories
1313

1414
- name: acl | update files
15-
template:
15+
ansible.builtin.template:
1616
src: etc/haproxy/acl.j2
1717
dest: "{{ item.dest }}"
1818
owner: "{{ item.owner | default('root') }}"

tasks/certificates.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# tasks file
22
---
33
- name: certificates | create directories
4-
file:
4+
ansible.builtin.file:
55
path: "{{ item.dest | dirname }}"
66
state: directory
77
owner: "{{ item.owner | default('root') }}"
@@ -13,7 +13,7 @@
1313
- haproxy-certificates-create-directories
1414

1515
- name: certificates | copy files
16-
copy:
16+
ansible.builtin.copy:
1717
src: "{{ item.src }}"
1818
dest: "{{ item.dest }}"
1919
owner: "{{ item.owner | default('root') }}"
@@ -26,7 +26,7 @@
2626
- haproxy-certificates-copy-files
2727

2828
- name: certificates | remove files
29-
file:
29+
ansible.builtin.file:
3030
path: "{{ item.dest }}"
3131
state: absent
3232
with_items: "{{ haproxy_ssl_map }}"

tasks/configuration.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# tasks file
22
---
33
- name: configuration | warn or fail
4-
fail:
4+
ansible.builtin.fail:
55
msg: "haproxy_global_nbproc is deprecated"
66
ignore_errors: "{{ haproxy_version is version('2.5', '<') }}"
77
when:
@@ -11,7 +11,7 @@
1111
- haproxy-configuration-warn-or-fail
1212

1313
- name: configuration | update file
14-
template:
14+
ansible.builtin.template:
1515
src: "{{ haproxy_conf_template }}"
1616
dest: /etc/haproxy/haproxy.cfg
1717
owner: root

tasks/install.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# tasks file
22
---
33
- name: install | dependencies (pre)
4-
apt:
4+
ansible.builtin.apt:
55
name: "{{ haproxy_dependencies_pre }}"
66
state: "{{ apt_install_state | default('latest') }}"
77
update_cache: true
@@ -10,23 +10,23 @@
1010
- haproxy-repository-install-dependencies
1111

1212
- name: install | add repository from PPA and install its signing key
13-
apt_repository:
13+
ansible.builtin.apt_repository:
1414
repo: "{{ haproxy_ppa }}"
1515
update_cache: true
1616
when: haproxy_use_ppa | bool
1717
tags:
1818
- haproxy-install-add-repository
1919

2020
- name: install | dependencies
21-
apt:
21+
ansible.builtin.apt:
2222
name: "{{ item.name }}"
2323
state: "{{ item.state }}"
2424
with_items: "{{ haproxy_dependencies }}"
2525
tags:
2626
- haproxy-install-dependencies
2727

2828
- name: install | additional
29-
apt:
29+
ansible.builtin.apt:
3030
name: "{{ haproxy_install }}"
3131
state: "{{ apt_install_state | default('latest') }}"
3232
tags:

tasks/letsencrypt.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# tasks file
22
---
33
- name: letsencrypt | copy SSL deploy script
4-
template:
4+
ansible.builtin.template:
55
src: "{{ haproxy_letsencrypt_ssl_deploy_template }}"
66
dest: "{{ haproxy_letsencrypt_ssl_deploy }}"
77
owner: root
@@ -11,7 +11,7 @@
1111
- haproxy-letsencrypt-ssl-deploy
1212

1313
- name: letsencrypt | copy OCSP deploy script
14-
template:
14+
ansible.builtin.template:
1515
src: "{{ haproxy_letsencrypt_ocsp_deploy_template }}"
1616
dest: "{{ haproxy_letsencrypt_ocsp_deploy }}"
1717
owner: root
@@ -21,7 +21,7 @@
2121
- haproxy-letsencrypt-ocsp-deploy
2222

2323
- name: letsencrypt | configure (cron) job for OCSP deploy
24-
cron:
24+
ansible.builtin.cron:
2525
name: haproxy-letsencrypt-ocsp-deploy
2626
job: "{{ haproxy_letsencrypt_ocsp_deploy }}"
2727
state: "{{ haproxy_letsencrypt_ocsp_deploy_job.state | default('absent') }}"

tasks/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# tasks file
22
---
33
- name: check version support
4-
fail:
4+
ansible.builtin.fail:
55
msg: "HAProxy version {{ haproxy_version }} is not supported"
66
when: haproxy_version | string not in haproxy_versions_supported
77
tags:
@@ -40,7 +40,7 @@
4040
- haproxy-letsencrypt
4141

4242
- name: start and enable service
43-
service:
43+
ansible.builtin.service:
4444
name: haproxy
4545
state: "{{ service_default_state | default('started') }}"
4646
enabled: "{{ service_default_enabled | default(true) | bool }}"

0 commit comments

Comments
 (0)