Co-authored-by: MKletz <michael.kletz.27@gmail.com> Co-authored-by: Ajay Chenampara <ajay.chenampara@gmail.com> Co-authored-by: dlemons-redhat <69318976+dlemons-redhat@users.noreply.github.com> Co-authored-by: Nicolas Leiva <nicolasleiva@gmail.com> Co-authored-by: benblasco <42140583+benblasco@users.noreply.github.com> Co-authored-by: Benjamin Blasco <bblasco@redhat.com> Co-authored-by: calvingsmith <4283930+calvingsmith@users.noreply.github.com> Co-authored-by: Calvin Smith <calvingsmith@users.noreply.github.com> Co-authored-by: Hicham Mourad <43329991+HichamMourad@users.noreply.github.com>
23 lines
578 B
YAML
23 lines
578 B
YAML
---
|
|
- name: Run Shell Script
|
|
hosts: "{{ _hosts | default(omit) }}"
|
|
become: true
|
|
gather_facts: false
|
|
vars:
|
|
shell_script: undef
|
|
|
|
tasks:
|
|
- name: Run Shell Script
|
|
ansible.builtin.shell: "{{ shell_script }}"
|
|
register: shell_output
|
|
tags:
|
|
- skip_ansible_lint # provided variable could require shell modele
|
|
|
|
- name: Print script output
|
|
ansible.builtin.debug:
|
|
var: shell_output.stdout_lines
|
|
|
|
- name: Print message
|
|
ansible.builtin.debug:
|
|
msg: You should really consider converting this script to a playbook!
|