Project

General

Profile

Bug #24981

[Satellite 6.3] ansible_provisioning_callback snippet does not set executable permission for '/root/ansible_provisioning_call.sh'

Added by Marek Hulán 3 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Templates
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1565903

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 -%>
  1. 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 -%>
  1. 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:

Associated revisions

Revision dd466218 (diff)
Added by Marek Hulán 3 months ago

Fixes #24981 - set x bit on ansible callback

History

#1 Updated by The Foreman Bot 3 months ago

  • Assignee set to Marek Hulán
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/community-templates/pull/516 added

#2 Updated by Marek Hulán 3 months ago

  • Status changed from Ready For Testing to Closed

#3 Updated by Tomer Brisker 2 months ago

  • Category set to Templates
  • Subject changed from [Satellite 6.3] ansible_provisioning_callback snippet does not set executable permission for '/root/ansible_provisioning_call.sh' to [Satellite 6.3] ansible_provisioning_callback snippet does not set executable permission for '/root/ansible_provisioning_call.sh'
  • Fixed in Releases 1.20.0 added

Also available in: Atom PDF