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.

Bug 1454563

Summary: [RFE] [6.3] Describe how to create a provisioning template code snippet for Ansible
Product: Red Hat Satellite Reporter: Andrew Dahms <adahms>
Component: Docs Managing HostsAssignee: csherrar
Status: CLOSED CURRENTRELEASE QA Contact: Melanie Corr <mcorr>
Severity: high Docs Contact:
Priority: high    
Version: 6.3.0CC: mcorr, sbream, sghai, swadeley, vijsingh
Target Milestone: UnspecifiedKeywords: FutureFeature
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: 2018-05-17 08:45:20 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:
Bug Depends On:    
Bug Blocks: 1486095    

Description Andrew Dahms 2017-05-23 04:40:58 UTC
Red Hat Satellite 6.3 introduces integration with Ansible Tower. One of the key enhancements is the ability to add a snippet to provisioning templates that allows administrators to configure hosts provisioned through Satellite using Ansible Tower.

An example must be added to the Provisioning Guide that outlines how to create this snippet, and referenced in the new section created in BZ#1454562.

Comment 2 Andrew Dahms 2017-12-18 21:25:42 UTC
*** Bug 1527206 has been marked as a duplicate of this bug. ***

Comment 3 Andrew Dahms 2018-01-09 23:59:28 UTC
Assigning to Clifton for review.

Comment 5 Sachin Ghai 2018-02-14 04:11:40 UTC
Correct, Following snippets have been added to Satellite 6.3 for Ansible tower integration with satellite6.3

a) ansible_provisioning_callback
b) ansible_tower_callback_script 
c) ansible_tower_callback_service 


Please note that these snippets are being used by Satellite Kikcstart default and Satellite kickstart default Finish templates.

In case of network-based provisioning, "Satellite kickstart default template" is updated w/ a call to "ansible_provisioning_callback" which internally calls  "ansible_tower_callback_service: snippet for all hosts based on systemd( for rhel7 hosts).

For other hosts(rhel6) and image based provisioning, "Satellite Kickstart Default Finish" template is updated with "ansible_tower_callback_script" and that copies the script on hosts under "/root/ansible_provisioning_call.sh" and performs the provisioning callback.



For a successful Integration user needs to define following Parameters in Satellite6.3 at host/hostgroup level.

 ansible_tower_provisioning => true
 ansible_tower_fqdn => TOWER_FQDN
 ansible_job_template_id => TEMPLATE_ID(get it from Tower)
 ansible_host_config_key => CONFIG_KEY(get it from Tower Job template)


Referenced BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1468717#c19

Comment 6 csherrar 2018-02-14 15:07:46 UTC
(In reply to Sachin Ghai from comment #5)
> Correct, Following snippets have been added to Satellite 6.3 for Ansible
> tower integration with satellite6.3
> 
> a) ansible_provisioning_callback
> b) ansible_tower_callback_script 
> c) ansible_tower_callback_service 
> 
> 
> Please note that these snippets are being used by Satellite Kikcstart
> default and Satellite kickstart default Finish templates.
> 
> In case of network-based provisioning, "Satellite kickstart default
> template" is updated w/ a call to "ansible_provisioning_callback" which
> internally calls  "ansible_tower_callback_service: snippet for all hosts
> based on systemd( for rhel7 hosts).
> 
> For other hosts(rhel6) and image based provisioning, "Satellite Kickstart
> Default Finish" template is updated with "ansible_tower_callback_script" and
> that copies the script on hosts under "/root/ansible_provisioning_call.sh"
> and performs the provisioning callback.
> 
> For a successful Integration user needs to define following Parameters in
> Satellite6.3 at host/hostgroup level.
> 
>  ansible_tower_provisioning => true
>  ansible_tower_fqdn => TOWER_FQDN
>  ansible_job_template_id => TEMPLATE_ID(get it from Tower)
>  ansible_host_config_key => CONFIG_KEY(get it from Tower Job template)
> 
> Referenced BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1468717#c19

Hi Sachin,

Thank you for the detailed information and link to BZ#1468717.

Regards,

Comment 7 Andrew Dahms 2018-02-18 22:25:25 UTC
Resetting the assignee and QA contact.

Comment 39 Steve Bream 2018-02-21 13:47:41 UTC
Agreed. I retract my attempts to push this forward. We have a published version, let's step back and complete QA properly, and we'll republish when we have Sachin's comments and a clean bill of QA-health.

Apologies for the confusion - I got GA-fever.

Thanks,
Steve