Skip to content

Commit

Permalink
Name all role tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
wbclark committed Aug 29, 2022
1 parent bce1337 commit e166ac1
Show file tree
Hide file tree
Showing 28 changed files with 99 additions and 47 deletions.
3 changes: 2 additions & 1 deletion roles/bats/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
ansible.builtin.debug:
msg: "{{ test_results.results | join('\n', attribute='stdout') }}"

- ansible.builtin.include_tasks: 'bats_fetch_results.yml'
- name: "Include bats_fetch_results.yml"
ansible.builtin.include_tasks: 'bats_fetch_results.yml'
when: bats_fetch_results

- name: "Fail if tests didn't pass"
Expand Down
3 changes: 2 additions & 1 deletion roles/custom_certificates/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@
args:
creates: "{{ custom_certificates_ca_directory_certs }}/{{ custom_certificates_server }}.crt"

- ansible.builtin.include_tasks: issue.yml
- name: 'include issue.yml'
ansible.builtin.include_tasks: issue.yml
when: custom_certificates_hostnames is defined
with_items: "{{ custom_certificates_hostnames }}"
loop_control:
Expand Down
6 changes: 4 additions & 2 deletions roles/customize_home/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
path: "{{ ansible_env.HOME }}/.gitkeep/"
state: absent

- ansible.builtin.include_tasks: clone_specified_repo.yml
- name: Include clone_specified_repo.yml
ansible.builtin.include_tasks: clone_specified_repo.yml
when: customize_home_git_repo is defined

- name: Check custom bootstrap script exists
ansible.builtin.stat:
path: "{{ ansible_env.HOME }}/{{ customize_home_bootstrap_script }}"
register: bootstrap_script_path

- ansible.builtin.include_tasks: boostrap_script.yml
- name: Include bootstrap_script.yml
ansible.builtin.include_tasks: boostrap_script.yml
when: bootstrap_script_path.stat.exists
3 changes: 2 additions & 1 deletion roles/dynflow_devel/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
- ansible.builtin.include_tasks: dynflow_install.yml
- name: Include dynflow_install.yml
ansible.builtin.include_tasks: dynflow_install.yml
3 changes: 2 additions & 1 deletion roles/fips/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
- ansible.builtin.include_tasks: 'el{{ ansible_distribution_major_version }}.yml'
- name: Include tasks specific to OS major version
ansible.builtin.include_tasks: 'el{{ ansible_distribution_major_version }}.yml'
when: not ansible_fips

- name: reboot vm
Expand Down
3 changes: 2 additions & 1 deletion roles/foreman_client_repositories/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
- ansible.builtin.include_tasks: "{{ foreman_client_repositories_environment }}_repo.yml"
- name: Include repositories_environment specific tasks
ansible.builtin.include_tasks: "{{ foreman_client_repositories_environment }}_repo.yml"
when:
- ansible_os_family == 'RedHat'

Expand Down
3 changes: 2 additions & 1 deletion roles/foreman_client_repositories/tasks/staging_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
priority: '1'
gpgcheck: no

- ansible.builtin.include_tasks: qpid.yml
- name: Include qpid.yml
ansible.builtin.include_tasks: qpid.yml
when:
- ansible_distribution_major_version == "7"
9 changes: 6 additions & 3 deletions roles/foreman_devel/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
---
- ansible.builtin.include_tasks: check_forks_of_repos.yml
- name: Include check_forks_of_repos.yml
ansible.builtin.include_tasks: check_forks_of_repos.yml
when: katello_devel_github_username is defined and foreman_installer_options_internal_use_only is defined

- ansible.builtin.include_tasks: rhel.yml
- name: Include rhel.yml
ansible.builtin.include_tasks: rhel.yml
when: ansible_distribution == "RedHat"

- ansible.builtin.include_tasks: github_push_ssh.yml
- name: Include github_push_ssh.yml
ansible.builtin.include_tasks: github_push_ssh.yml
when: foreman_devel_github_push_ssh

- name: setup reviewing script
Expand Down
3 changes: 2 additions & 1 deletion roles/foreman_installer/tasks/install.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
- ansible.builtin.include_tasks: installer_version.yml
- name: Include installer_version.yml
ansible.builtin.include_tasks: installer_version.yml

- name: 'Check if foreman_installer_options is a string'
ansible.builtin.fail:
Expand Down
18 changes: 12 additions & 6 deletions roles/foreman_installer/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
---
- ansible.builtin.include_tasks: packages.yml
- name: Include packages.yml
ansible.builtin.include_tasks: packages.yml

- ansible.builtin.include_tasks: locales.yml
- name: Include locales.yml
ansible.builtin.include_tasks: locales.yml
when: ansible_os_family == 'Debian'

- ansible.builtin.include_tasks: module_prs.yml
- name: Include module_prs.yml
ansible.builtin.include_tasks: module_prs.yml
when: (foreman_installer_module_prs|length > 0) or (foreman_installer_module_branches|length > 0)

- ansible.builtin.include_tasks: custom_hiera.yml
- name: Include custom_hiera.yml
ansible.builtin.include_tasks: custom_hiera.yml
when: foreman_installer_custom_hiera

- ansible.builtin.include_tasks: install.yml
- name: Include install.yml
ansible.builtin.include_tasks: install.yml
when: not foreman_installer_upgrade

- ansible.builtin.include_tasks: upgrade.yml
- name: Include upgrade.yml
ansible.builtin.include_tasks: upgrade.yml
when: foreman_installer_upgrade
6 changes: 4 additions & 2 deletions roles/foreman_installer/tasks/module_prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
tags:
- packages

- ansible.builtin.include_tasks: module_pr.yml
- name: Include module_pr.yml for specified pull request
ansible.builtin.include_tasks: module_pr.yml
vars:
pr: true
loop: "{{ foreman_installer_module_prs }}"
Expand All @@ -30,7 +31,8 @@
tags:
- packages

- ansible.builtin.include_tasks: module_pr.yml
- name: Include module_pr.yml for specified branch
ansible.builtin.include_tasks: module_pr.yml
vars:
branch: true
loop: "{{ foreman_installer_module_branches }}"
Expand Down
3 changes: 2 additions & 1 deletion roles/foreman_installer/tasks/upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
- ansible_os_family == "RedHat"
- ansible_distribution_major_version == '8'

- ansible.builtin.include_tasks: installer_version.yml
- name: Include installer_version.yml
ansible.builtin.include_tasks: installer_version.yml

- name: 'Set internal installer options'
ansible.builtin.set_fact:
Expand Down
3 changes: 2 additions & 1 deletion roles/foreman_provisioning_infrastructure/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
register: foreman_provisioning_compute_profile_cmd
ignore_errors: True

- ansible.builtin.include_tasks: compute_profiles.yml
- name: 'Include compute_profiles.yml'
ansible.builtin.include_tasks: compute_profiles.yml
when: "'Error' not in foreman_provisioning_compute_profile_cmd.stderr"

# Domain
Expand Down
3 changes: 2 additions & 1 deletion roles/foreman_proxy_content/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
vars:
foreman_settings_yaml: "{{ (foreman_settings['content'] | b64decode | from_yaml) }}"

- ansible.builtin.include_tasks: certs_generate.yml
- name: Include certs_generate.yml
ansible.builtin.include_tasks: certs_generate.yml

- name: 'Change cert permissions'
ansible.builtin.file: path='/etc/pki/katello/private' mode=0775
Expand Down
9 changes: 6 additions & 3 deletions roles/foreman_proxy_content/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
- ansible.builtin.include_tasks: devel_install.yml
- name: Include devel_install.yml
ansible.builtin.include_tasks: devel_install.yml
when: (not foreman_proxy_content_upgrade and devel is defined and devel)

- ansible.builtin.include_tasks: install.yml
- name: Include install.yml
ansible.builtin.include_tasks: install.yml
when: not foreman_proxy_content_upgrade

- ansible.builtin.include_tasks: upgrade.yml
- name: Include upgrade.yml
ansible.builtin.include_tasks: upgrade.yml
when: foreman_proxy_content_upgrade
3 changes: 2 additions & 1 deletion roles/foreman_proxy_content/tasks/upgrade.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
- ansible.builtin.include_tasks: certs_generate.yml
- name: Include certs_generate.yml
ansible.builtin.include_tasks: certs_generate.yml

- name: 'Run installer upgrade'
ansible.builtin.include_role:
Expand Down
3 changes: 2 additions & 1 deletion roles/foreman_repositories/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
- ansible.builtin.include_tasks: "{{ ansible_os_family|lower }}_{{ foreman_repositories_environment }}_repos.yml"
- name: Include OS + environment specific tasks
ansible.builtin.include_tasks: "{{ ansible_os_family|lower }}_{{ foreman_repositories_environment }}_repos.yml"

- name: 'Install centos-release-scl-rh'
ansible.builtin.yum:
Expand Down
6 changes: 4 additions & 2 deletions roles/forklift_versions/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
- ansible.builtin.include_tasks: versions.yml
- name: Include versions.yml
ansible.builtin.include_tasks: versions.yml
when: not upgrade

- ansible.builtin.include_tasks: upgrade.yml
- name: Include upgrade.yml
ansible.builtin.include_tasks: upgrade.yml
when: upgrade
7 changes: 5 additions & 2 deletions roles/freeipa_server/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
- ansible.builtin.include_tasks: install_freeipa_server.yml
- ansible.builtin.include_tasks: install_freeipa_client.yml
- name: Include install_freeipa_server.yml
ansible.builtin.include_tasks: install_freeipa_server.ymli

- name: Include intsall_freeipa_client.yml
ansible.builtin.include_tasks: install_freeipa_client.yml
7 changes: 5 additions & 2 deletions roles/hammer_devel/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
- ansible.builtin.include_tasks: hammer_install.yml
- ansible.builtin.include_tasks: hammer_config.yml
- name: Include hammer_install.yml
ansible.builtin.include_tasks: hammer_install.yml

- name: Include hammer_config.yml
ansible.builtin.include_tasks: hammer_config.yml
3 changes: 2 additions & 1 deletion roles/koji/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
- ansible.builtin.include_tasks: download.yml
- name: Include download.yml
ansible.builtin.include_tasks: download.yml
when: koji_task_ids != [] or koji_build_ids != []
6 changes: 4 additions & 2 deletions roles/libvirt/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
dest: /etc/libvirt/libvirtd.conf
line: 'auth_unix_rw = "none"'

- ansible.builtin.include_tasks: 'nested.yml'
- name: Include nested.yml
ansible.builtin.include_tasks: 'nested.yml'
when: libvirt_nested

- name: 'restart libvirt'
ansible.builtin.service: name=libvirtd state=restarted

- ansible.builtin.include_tasks: 'tftp.yml'
- name: Include tftp.yml
ansible.builtin.include_tasks: 'tftp.yml'
when: libvirt_tftp
6 changes: 4 additions & 2 deletions roles/powerdns/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@
state: "restarted"
when: pdns_configured.changed

- ansible.builtin.include_tasks: "schema.mysql.yml"
- name: "Include schema.mysql.yml"
ansible.builtin.include_tasks: "schema.mysql.yml"
when: powerdns_db_backend == "gmysql"

- ansible.builtin.include_tasks: "zones.yml"
- name: "Include zones.yml"
ansible.builtin.include_tasks: "zones.yml"
when: powerdns_zones
3 changes: 2 additions & 1 deletion roles/pytest_project/tasks/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
chdir: "{{ pytest_project_directory }}"
when: pytest_run_tests

- ansible.builtin.include_tasks: local_env.yml
- name: 'Include local_env.yml'
ansible.builtin.include_tasks: local_env.yml
when: not pytest_run_tests
12 changes: 9 additions & 3 deletions roles/realm_join/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
- name: "Load OS specific variables"
ansible.builtin.include_vars: "{{ ansible_os_family }}.yml"
- ansible.builtin.include_tasks: install_pexpect.yml
- ansible.builtin.include_tasks: realm_join_ad.yml
- ansible.builtin.include_tasks: prepare_httpd_mod_auth.yml

- name: Include install_pexpect.yml
ansible.builtin.include_tasks: install_pexpect.yml

- name: Include realm_join_ad.yml
ansible.builtin.include_tasks: realm_join_ad.yml

- name: Include prepare_httpd_mod_auth.yml
ansible.builtin.include_tasks: prepare_httpd_mod_auth.yml
3 changes: 2 additions & 1 deletion roles/robottelo/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
pytest_project_virtualenv_command: "{{ robottelo_virtualenv_command }}"
pytest_project_version: "{{ robottelo_version }}"

- ansible.builtin.include_tasks: ssh.yml
- name: Include ssh.yml
ansible.builtin.include_tasks: ssh.yml

- name: robottelo properties file
ansible.builtin.command: cp robottelo.properties.sample robottelo.properties
Expand Down
3 changes: 2 additions & 1 deletion roles/sos_report/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
ansible.builtin.command: "sosreport --batch --tmp-dir={{ sosreport_output_dir }}"
ignore_errors: true

- ansible.builtin.include_tasks: 'sosreport_fetch_results.yml'
- name: Include sosreport_fetch_results.yml
ansible.builtin.include_tasks: 'sosreport_fetch_results.yml'
when: sosreport_fetch
6 changes: 4 additions & 2 deletions roles/vagrant/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
name: vagrant-{{ vagrant_version }}
state: present

- ansible.builtin.include_tasks: 'vagrant_libvirt.yml'
- name: 'include vagrant_libvirt.yml'
ansible.builtin.include_tasks: 'vagrant_libvirt.yml'
when: vagrant_libvirt

- ansible.builtin.include_tasks: 'vagrant_scp.yml'
- name: 'include vagrant_scp.yml'
ansible.builtin.include_tasks: 'vagrant_scp.yml'
when: vagrant_scp

0 comments on commit e166ac1

Please sign in to comment.