Skip to content

Commit a091c9b

Browse files
committed
feat(roles/setup): Profile installation tasks uing installer-profile tool
1 parent f467aa8 commit a091c9b

File tree

1 file changed

+20
-0
lines changed
  • playbooks/satellite/roles/setup/tasks

1 file changed

+20
-0
lines changed

playbooks/satellite/roles/setup/tasks/main.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,26 @@
125125
ansible.builtin.debug:
126126
msg: "SatelliteInstallerScenarioSatellite {{ installer_cmd.start }} to {{ installer_cmd.end }} taking {{ duration }} seconds"
127127

128+
- name: Download `installer-profile` tool
129+
ansible.builtin.get_url:
130+
url: https://raw.githubusercontent.com/theforeman/foreman-installer/3488fe9d2df663280586c261ed2e03818ea95cf8/bin/installer-profile
131+
dest: /tmp/installer-profile
132+
mode: '0500'
133+
134+
- name: Run `installer-profile` against the current installation log file
135+
ansible.builtin.command:
136+
cmd: /tmp/installer-profile /var/log/foreman-installer/satellite.log
137+
register: installer_profile_cmd
138+
139+
- name: Show `installer-profile` output
140+
ansible.builtin.debug:
141+
var: installer_profile_cmd.stdout_lines
142+
143+
- name: Print profiled tasks duration
144+
ansible.builtin.debug:
145+
msg: "SatelliteInstallerProfile{{ item | regex_replace('^([0-9]+).([0-9]+): (.*)$', '\\3') }} {{ installer_cmd.start }} to {{ installer_cmd.end }} taking {{ item | regex_replace('^([0-9]+).([0-9]+): (.*)$', '\\1.\\2') }} seconds"
146+
loop: "{{ installer_profile_cmd.stdout_lines }}"
147+
128148
- name: "Enable IOP advisor engine"
129149
ansible.builtin.shell:
130150
cmd: |

0 commit comments

Comments
 (0)