Bug 1725817
| Summary: | Ansible Power job fails silently | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | hprakash |
| Component: | Ansible - Configuration Management | Assignee: | satellite6-bugs <satellite6-bugs> |
| Status: | CLOSED ERRATA | QA Contact: | Ondrej Gajdusek <ogajduse> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.5.0 | CC: | dmatoule, nshaik, ogajduse, quentin.equinet, rankumar, shisingh, susalvi |
| Target Milestone: | 6.9.0 | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-04-21 13:11:48 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
hprakash
2019-07-01 13:44:10 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/591 has been resolved. The multi-line script doesn't work using '|' with the command module.
Workaround:
Modify job template "Power Action - Ansible Default - Ansible " like below
---
- hosts: all
tasks:
- shell: |
echo <%= input('action') %> host && sleep 3
<%= case input('action')
when 'restart'
'shutdown -r +1'
else
'shutdown -h +1'
end %>
PR opened upstream https://github.com/theforeman/community-templates/pull/592 Created redmine issue https://projects.theforeman.org/issues/30091 from this bug Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/30091 has been resolved. Fix is in Satellite 6.9 SNAP 1 with tfm-rubygem-foreman_ansible-6.0.0-1.el7sat.noarch Provided fix fixes the behavior. VERIFIED using the reproducer in the description. After the job is invocated, the host is rebooted and the job's status changes to 'success' after the host reboots. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: Satellite 6.9 Release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:1313 |