Skip to content

Commit da14524

Browse files
committed
Use fully qualified collection names in roles/
1 parent 672aeb7 commit da14524

142 files changed

Lines changed: 606 additions & 606 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
- name: "Find bats files"
3-
find:
3+
ansible.builtin.find:
44
paths: "{{ bats_output_dir }}"
55
patterns: "*.tap"
66
register: bats_results
77

88
- name: "Copy bats results"
9-
fetch:
9+
ansible.builtin.fetch:
1010
src: "{{ item.path }}"
1111
dest: "{{ bats_remote_dir }}"
1212
with_items: "{{ bats_results.files }}"

roles/bats/tasks/main.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
---
22
- name: "Load OS variables"
3-
include_vars: "{{ ansible_os_family }}.yml"
3+
ansible.builtin.include_vars: "{{ ansible_os_family }}.yml"
44

55
- name: "install required packages"
6-
package:
6+
ansible.builtin.package:
77
name: "{{ bats_packages }}"
88
state: present
99

1010
- name: "Install bats from package"
11-
package:
11+
ansible.builtin.package:
1212
name: "bats"
1313
state: present
1414
ignore_errors: yes
1515

1616
- name: "Get /usr/bin/bats stat"
17-
stat:
17+
ansible.builtin.stat:
1818
path: "/usr/bin/bats"
1919
register: bats_bin
2020

2121
- name: "Clone bats"
22-
git:
22+
ansible.builtin.git:
2323
repo: "https://github.com/sstephenson/bats.git"
2424
dest: "{{ bats_git_dir }}"
2525
when: not bats_bin.stat.exists
2626

2727
- name: "Install bats"
28-
shell: "{{ bats_git_dir }}/install.sh /usr"
28+
ansible.builtin.shell: "{{ bats_git_dir }}/install.sh /usr"
2929
args:
3030
creates: "/usr/bin/bats"
3131

3232
- name: "Clone forklift"
33-
git:
33+
ansible.builtin.git:
3434
repo: "{{ bats_forklift_repo }}"
3535
dest: "{{ bats_forklift_dir }}"
3636
update: "{{ bats_update_forklift }}"
3737
version: "{{ bats_forklift_version }}"
3838

3939
- name: "Bats output directory"
40-
file:
40+
ansible.builtin.file:
4141
state: "directory"
4242
path: "{{ bats_output_dir }}"
4343

4444
- block:
4545
- name: "Run bats"
46-
shell: "bats --tap {{ item }} > {{ bats_output_dir }}/{{ item }}.tap"
46+
ansible.builtin.shell: "bats --tap {{ item }} > {{ bats_output_dir }}/{{ item }}.tap"
4747
args:
4848
chdir: "{{ bats_forklift_dir }}/bats"
4949
with_items:
@@ -56,7 +56,7 @@
5656
environment: "{{ bats_environment }}"
5757

5858
- name: "Read results"
59-
shell: "cat {{ bats_output_dir }}/{{ item }}.tap"
59+
ansible.builtin.shell: "cat {{ bats_output_dir }}/{{ item }}.tap"
6060
register: "test_results"
6161
with_items:
6262
- "{{ bats_setup | select() | list }}"
@@ -65,14 +65,14 @@
6565
- "{{ bats_teardown | select() | list }}"
6666

6767
- name: "Output test results"
68-
debug:
68+
ansible.builtin.debug:
6969
msg: "{{ test_results.results | join('\n', attribute='stdout') }}"
7070

71-
- include_tasks: 'bats_fetch_results.yml'
71+
- ansible.builtin.include_tasks: 'bats_fetch_results.yml'
7272
when: bats_fetch_results
7373

7474
- name: "Fail if tests didn't pass"
75-
fail:
75+
ansible.builtin.fail:
7676
msg: "Test failed, please see {{ bats_output_dir }}/ for more information"
7777
when: item.rc != 0
7878
with_items: "{{ test_output.results }}"

roles/cleanup_rh_ruby25/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
- name: Remove rh-ruby25 packages
3-
package:
3+
ansible.builtin.package:
44
state: absent
55
name: rh-ruby25*
66
when:

roles/custom_certificates/tasks/issue.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
- name: 'Creating signing request'
3-
command: >
3+
ansible.builtin.command: >
44
openssl req -new
55
-newkey rsa:2048
66
-nodes
@@ -11,7 +11,7 @@
1111
creates: "{{ custom_certificates_ca_directory_requests }}/{{ custom_certificates_hostname }}.csr"
1212

1313
- name: 'Sign signing request'
14-
command: >
14+
ansible.builtin.command: >
1515
openssl ca
1616
-config "{{ custom_certificates_ca_directory }}/openssl.cnf"
1717
-batch

roles/custom_certificates/tasks/main.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
11
---
22
- name: 'Install openssl'
3-
yum:
3+
ansible.builtin.yum:
44
name: openssl
55
state: present
66

77
- name: 'Create certs directory'
8-
file:
8+
ansible.builtin.file:
99
path: "{{ custom_certificates_ca_directory_certs }}"
1010
state: directory
1111
mode: 0755
1212

1313
- name: 'Create keys directory'
14-
file:
14+
ansible.builtin.file:
1515
path: "{{ custom_certificates_ca_directory_keys }}"
1616
state: directory
1717
mode: 0755
1818

1919
- name: 'Create requests directory'
20-
file:
20+
ansible.builtin.file:
2121
path: "{{ custom_certificates_ca_directory_requests }}"
2222
state: directory
2323
mode: 0755
2424

2525
- name: 'Deploy configuration file'
26-
template:
26+
ansible.builtin.template:
2727
src: openssl.cnf.j2
2828
dest: "{{ custom_certificates_ca_directory }}/openssl.cnf"
2929
owner: root
3030
group: root
3131
mode: 0644
3232

3333
- name: 'Create index file'
34-
file:
34+
ansible.builtin.file:
3535
path: "{{ custom_certificates_ca_directory }}/index.txt"
3636
state: touch
3737
owner: root
3838
group: root
3939
mode: 0644
4040

4141
- name: 'Ensure serial starting number'
42-
template:
42+
ansible.builtin.template:
4343
src: serial.j2
4444
dest: "{{ custom_certificates_ca_directory }}/serial"
4545
force: no
@@ -48,7 +48,7 @@
4848
mode: 0644
4949

5050
- name: 'Creating CA certificate and key'
51-
command: >
51+
ansible.builtin.command: >
5252
openssl req -new
5353
-x509
5454
-nodes
@@ -60,14 +60,14 @@
6060
creates: "{{ custom_certificates_ca_directory_certs }}/custom_ca.crt"
6161

6262
- name: 'Create server key'
63-
command: >
63+
ansible.builtin.command: >
6464
openssl genrsa
6565
-out "{{ custom_certificates_ca_directory_keys }}/{{ custom_certificates_server }}.key"
6666
args:
6767
creates: "{{ custom_certificates_ca_directory_keys }}/{{ custom_certificates_server }}.key"
6868

6969
- name: 'Create server signing request'
70-
command: >
70+
ansible.builtin.command: >
7171
openssl req
7272
-new
7373
-config "{{ custom_certificates_ca_directory }}/openssl.cnf"
@@ -77,7 +77,7 @@
7777
creates: "{{ custom_certificates_ca_directory_requests }}/{{ custom_certificates_server }}.csr"
7878

7979
- name: 'Create server certificate'
80-
command: >
80+
ansible.builtin.command: >
8181
openssl ca
8282
-create_serial
8383
-batch
@@ -88,7 +88,7 @@
8888
args:
8989
creates: "{{ custom_certificates_ca_directory_certs }}/{{ custom_certificates_server }}.crt"
9090

91-
- include: issue.yml
91+
- ansible.builtin.include: issue.yml
9292
when: custom_certificates_hostnames is defined
9393
with_items: "{{ custom_certificates_hostnames }}"
9494
loop_control:
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
- name: Make boostrap file executable
2-
file:
2+
ansible.builtin.file:
33
dest: "{{ ansible_env.HOME }}/{{ customize_home_bootstrap_script }}"
44
state: touch
55
follow: false
@@ -8,5 +8,5 @@
88

99
# The script is already on the machine, so using 'command' instead of 'script'. 'script' copies the script from the Ansible controller
1010
- name: Run custom bootstrap script
11-
command: "{{ ansible_env.HOME }}/{{ customize_home_bootstrap_script }}"
11+
ansible.builtin.command: "{{ ansible_env.HOME }}/{{ customize_home_bootstrap_script }}"
1212
when: bootstrap_script_path.stat.exists
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
- name: Ensure temporary home directory does not exist
2-
file:
2+
ansible.builtin.file:
33
path: "{{ ansible_env.HOME }}/tmp_custom_home/"
44
state: absent
55

66
- name: Clone specified repo into temporary custom home directory
7-
git:
7+
ansible.builtin.git:
88
repo: "{{ customize_home_git_repo }}"
99
dest: "{{ ansible_env.HOME }}/tmp_custom_home/"
1010

1111
- name: Remove .git directory from temporary home directory after cloning
12-
file:
12+
ansible.builtin.file:
1313
path: "{{ ansible_env.HOME }}/tmp_custom_home/.git"
1414
state: absent
1515

1616
- name: Remove .gitignore from temporary home directory after cloning
17-
file:
17+
ansible.builtin.file:
1818
path: "{{ ansible_env.HOME }}/tmp_custom_home/.gitignore"
1919
state: absent
2020

@@ -24,6 +24,6 @@
2424
command: "cp -r {{ ansible_env.HOME }}/tmp_custom_home/. {{ ansible_env.HOME }}/"
2525

2626
- name: Remove temporary home directory
27-
file:
27+
ansible.builtin.file:
2828
path: "{{ ansible_env.HOME }}/tmp_custom_home/"
2929
state: absent
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
- name: Check for specified files to copy to home directory
22
become: false
3-
stat:
3+
ansible.builtin.stat:
44
path: "{{ playbook_dir | dirname }}/user_devel_env_files/"
55
delegate_to: localhost
66
register: custom_home
77

88
- name: Copy files to home directory
9-
copy:
9+
ansible.builtin.copy:
1010
src: "{{ playbook_dir | dirname }}/user_devel_env_files/"
1111
dest: "{{ ansible_env.HOME }}"
1212
when: custom_home.stat.isdir is defined and custom_home.stat.isdir
1313

1414
- name: Remove .gitkeep file copied over from custom directory
15-
file:
15+
ansible.builtin.file:
1616
path: "{{ ansible_env.HOME }}/.gitkeep/"
1717
state: absent
1818

19-
- include_tasks: clone_specified_repo.yml
19+
- ansible.builtin.include_tasks: clone_specified_repo.yml
2020
when: customize_home_git_repo is defined
2121

2222
- name: Check custom bootstrap script exists
23-
stat:
23+
ansible.builtin.stat:
2424
path: "{{ ansible_env.HOME }}/{{ customize_home_bootstrap_script }}"
2525
register: bootstrap_script_path
2626

27-
- include_tasks: boostrap_script.yml
27+
- ansible.builtin.include_tasks: boostrap_script.yml
2828
when: bootstrap_script_path.stat.exists
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
- name: add distribution-specific variables
3-
include_vars: "{{ ansible_distribution }}.yml"
3+
ansible.builtin.include_vars: "{{ ansible_distribution }}.yml"
44

55
- name: add backports repository
6-
apt_repository:
6+
ansible.builtin.apt_repository:
77
repo: 'deb {{ debian_backports_uri }} {{ debian_backports_components }}'
88
state: present
99
update_cache: yes

roles/disable_firewall/tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
- name: disable firewalld
3-
service:
3+
ansible.builtin.service:
44
name: firewalld
55
enabled: false
66
state: stopped
77
ignore_errors: true
88

99
- name: disable iptables
10-
service:
10+
ansible.builtin.service:
1111
name: iptables
1212
enabled: false
1313
state: stopped

0 commit comments

Comments
 (0)