Bug 1592570
Summary: | [RFE]: Ship Ansible Playbook for bootstrap.py as part of the katello-client-bootstrap package. | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Taft Sanders <tasander> |
Component: | Bootstrap | Assignee: | Evgeni Golov <egolov> |
Status: | CLOSED ERRATA | QA Contact: | Stephen Wadeley <swadeley> |
Severity: | low | Docs Contact: | |
Priority: | high | ||
Version: | 6.3.1 | CC: | akarimi, awestbro, bkearney, egolov, ehelms, nkathole, rjerrido, tasander |
Target Milestone: | 6.5.0 | Keywords: | FutureFeature, Triaged |
Target Release: | Unused | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | katello-client-bootstrap-1.6.0-2 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-05-14 12:37:27 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
Taft Sanders
2018-06-18 21:32:56 UTC
Any reason why https://github.com/Katello/katello-client-bootstrap/blob/master/bootstrap.yml wouldn't work? All we'd need to do is package/test it. Updating component to bootstrap to package upstream playbook. Hello Evgeni [root@sat-6-5-qa-rhel7 ~]# rpm -q katello-client-bootstrap katello-client-bootstrap-1.7.0-1.el7sat.noarch [root@sat-6-5-qa-rhel7 ~]# man katello-client-bootstrap No manual entry for katello-client-bootstrap [root@sat-6-5-qa-rhel7 ~]# katello-client-bootstrap -h -bash: katello-client-bootstrap: command not found [root@sat-6-5-qa-rhel7 ~]# which katello-client-bootstrap /usr/bin/which: no katello-client-bootstrap in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/puppetlabs/bin:/root/bin) [root@sat-6-5-qa-rhel7 ~]# rpm -qd katello-client-bootstrap /usr/share/doc/katello-client-bootstrap-1.7.0/README.md /usr/share/doc/katello-client-bootstrap-1.7.0/bootstrap.yml [root@sat-6-5-qa-rhel7 ~]# less /usr/share/doc/katello-client-bootstrap-1.7.0/README.md <snip> # Dependencies * Python2 >= 2.5 or 2.4 with python-simplejson installed * subscription-manager (if the machine has no previous subscription) * subscription-manager-migration >= 1.14.2 (if the machine is subscribed to Satellite 5 or Red Hat Classic) <snip> # Ansible integration The `bootstrap.yml` file contains a playbook for [Ansible](https://www.ansible.com/) which can be used to copy `bootstrap.py` to the target machine and execute it there with predefined parameters. So I should test that be copying and editing this: [root@sat-6-5-qa-rhel7 ~]# less /usr/share/doc/katello-client-bootstrap-1.7.0/bootstrap.yml Thank you Hello I was able to register a host to Satellite, but the last line of the ansible log says: rhel7.localhost.example.com : ok=3 changed=0 unreachable=0 failed=1 I have asked Evgeni to review that to see why it says "failed=1", but its seems out of scope for this bug as the bootstrap.yml file is present as mentioned in comment 5 and it works with minor config edits as expected. I copied and then edited local copy of bootstrap.yml as follows: - hosts: rhel7.localhost.example.com vars: bootstrap_foreman_fqdn: sat-6-5-qa-rhel7.localhost.example.com bootstrap_download_method: http bootstrap_org: "Default Organization" bootstrap_location: "Default Location" bootstrap_activationkey: "test_ak" bootstrap_login: "admin" bootstrap_password: "changeme" bootstrap_hostgroup: "testHG" bootstrap_additional_args: "--force" bootstrap_target_path: /root/bootstrap.py bootstrap_local_copy: False I added: rhel7.localhost.example.com in /etc/ansible/hosts Thanks to Evgeni for these tips: Added: stdout_callback = yaml in "/etc/ansible/ansible.cfg" and used this command to get clear command output: ~]# ANSIBLE_NOCOLOR=1 ansible-playbook bootstrap.yml | tee -a ansible.log Thank you Hello Re failed=1 in comment 6 Evgeni says: Its because of this line in the log: [[91mERROR[0m], [2019-02-04 16:12:17], EXITING: [/usr/bin/yum -y install katello-agent] failed to execute properly. which is because you're subscribing into a content view that has no katello-agent packages for this test that is not relevant, that is an optional package you can pass "--skip katello-agent" to skip that step Thank you 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 |