Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
[Satellite 6.3] 'ansible_provisioning_callback snippet' does not set executable permission for '/root/ansible_provisioning_call.sh'
Version-Release number of selected component (if applicable):
Red Hat Satellite 6.3
How reproducible:
Always
Steps to Reproduce:
1. on GUI see the below in snippet "ansible_provisioning_callback":
---------------
<% else -%>
# Assume systemd is not available
<%= save_to_file('/root/ansible_provisioning_call.sh', snippet('ansible_tower_callback_script')) %>
(crontab -u root -l 2>/dev/null; echo "@reboot /root/ansible_provisioning_call.sh" ) | crontab -u root -
<% end -%>
<% end -%>
---------------
In above creating the "/root/ansible_provisioning_call.sh" but without executable permission due to which after reboot cron get run but without success.
Actual results:
File create without executable permission.
Expected results:
File should create with executable permission:
e.g. snippet
-----------------
<% else -%>
# Assume systemd is not available
<%= save_to_file('/root/ansible_provisioning_call.sh', snippet('ansible_tower_callback_script')) %>
(chmod +x /root/ansible_provisioning_call.sh;crontab -u root -l 2>/dev/null; echo "@reboot /root/ansible_provisioning_call.sh" ) | crontab -u root - <====
-----------------
Additional info:
Quickly looking at that, it seems the chmod is there but can fail for some reason. My guess is that the ansible_tower_callback_script does not render \n at the end, could you please ask customer to "Preview" the template for some host, so we get rendered version on his environment? Thanks
This issue is not Satellite 6.3 specific therefore omitting "[Satellite 6.3]" from BZ title
One can expect this BZ to be cloned for other Satellite versions as well (depends on triage team)
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, 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-2019:1222
Description of problem: [Satellite 6.3] 'ansible_provisioning_callback snippet' does not set executable permission for '/root/ansible_provisioning_call.sh' Version-Release number of selected component (if applicable): Red Hat Satellite 6.3 How reproducible: Always Steps to Reproduce: 1. on GUI see the below in snippet "ansible_provisioning_callback": --------------- <% else -%> # Assume systemd is not available <%= save_to_file('/root/ansible_provisioning_call.sh', snippet('ansible_tower_callback_script')) %> (crontab -u root -l 2>/dev/null; echo "@reboot /root/ansible_provisioning_call.sh" ) | crontab -u root - <% end -%> <% end -%> --------------- In above creating the "/root/ansible_provisioning_call.sh" but without executable permission due to which after reboot cron get run but without success. Actual results: File create without executable permission. Expected results: File should create with executable permission: e.g. snippet ----------------- <% else -%> # Assume systemd is not available <%= save_to_file('/root/ansible_provisioning_call.sh', snippet('ansible_tower_callback_script')) %> (chmod +x /root/ansible_provisioning_call.sh;crontab -u root -l 2>/dev/null; echo "@reboot /root/ansible_provisioning_call.sh" ) | crontab -u root - <==== ----------------- Additional info: