Files
product-demos/linux/run_script.yml
2023-09-25 15:56:11 -04:00

23 lines
579 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!