Skip to content

Commit

Permalink
dev: tail instead of cat
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudguruab committed Oct 24, 2023
1 parent 98e1a9f commit 7c8a6e1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions os_migrate/roles/import_workloads/tasks/workload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,15 @@
- prelim is defined and prelim.changed
- item["_migration_params"]["data_copy"]|default(true)

- name: print file contents
ansible.builtin.command: 'cat {{ os_migrate_data_dir }}/workload_logs/osm_server.log'
- name: Capture file contents
ansible.builtin.command: 'tail -n 300 {{ os_migrate_data_dir }}/workload_logs/osm_server.log'
register: file_contents
changed_when: false

- name: Print entire file contents
ansible.builtin.debug:
var: file_contents.stdout
changed_when: false

- name: transfer volumes to destination
os_migrate.os_migrate.import_workload_transfer_volumes:
Expand Down

0 comments on commit 7c8a6e1

Please sign in to comment.