-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kickstart_repository (field "synced content") is not correctly set when creating a host via the ansibel module redhat.satellite.host #1090
Comments
can you try setting the |
The host group I'm using in my playbook is normally setting the content_source. |
Thanks for trying! Was worth a shot. I'll see if we can repro this and why it happens. |
just for clarification, if you edit the host in the UI, the only thing you need to set to get a working host is the "synced content" thing? |
So I tried to reproduce this, and couldn't. The created host had a "synced content" KS as desired. Here is the playbook I used - hosts: localhost
gather_facts: false
vars:
foreman_username: admin
foreman_password: changeme
foreman_url: https://foreman.example.com
foreman_validate_certs: False
foreman_initial_organization: Default Organization
tasks:
- name: create host
theforeman.foreman.host:
username: "{{ foreman_username }}"
password: "{{ foreman_password }}"
server_url: "{{ foreman_url }}"
validate_certs: "{{ foreman_validate_certs }}"
organization: "{{ foreman_initial_organization }}"
location: "Default Location"
hostgroup: "egolov-test"
name: 'test1.kangae.example.com'
build: False
managed: True
lifecycle_environment: Library
content_view: "Default Organization View"
content_source: foreman.example.com
kickstart_repository: Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.4
mac: fe:fe:fe:fe:fe:fe |
Is the KS repository you're trying to set in the Lifecycle Environment/Content View you assign? |
Or maybe the |
One more thought: if it's CV/LCE, we can easily enforce those when searching for the KS repo and yield an appropriate error if it's not found. But I am not sure how to do the same for the OS. |
ping @bertelsp, were you able to find out why the synced content wasn't selected in your case? |
Hi,
via RedHat support it was confirmed to be a bug, they were able to
reproduce the issue.
"During the test, it has been noticed that if we set the option
'kickstart_repository' on the playbook, it will overwrite the
kickstart_repository_id from the hostgroup to the kickstart that matches
with this name, which by default is the repository available on the
'Default Organization View' and Library lifecycle environment"
See bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1915872
Kind regards,
Peter
…On Wed, 20 Jan 2021 at 14:11, Evgeni Golov ***@***.***> wrote:
ping @bertelsp <https://github.com/bertelsp>, were you able to find out
*why* the synced content wasn't selected in your case?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1090 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASBKQ5TVOJFVWTENH6LZVGDS23JBJANCNFSM4UR2QFUA>
.
|
Ah, wonderful, there is a reproducer setup in the BZ, I'll follow up with the data I can obtain there. Thanks! |
SUMMARY
Using the ansible module redhat.satellite.host to create a host on our Satellite server it seems the selected kickstart_repository is not correctly set in field "synced content" (although it is correctly set in the playbook). The field on the satellite host remains gray.
When trying to kickstart the host anyway the URL refers to a library URL instead to a lifecycle environment URL.
When doing this through the Satellite GUI, this it correctly set upon selecting the operating system (dynamically updated).
ISSUE TYPE
ANSIBLE VERSION
ansible 2.8.16
KATELLO/FOREMAN VERSION
tfm-rubygem-katello-3.14.0.32-1.el7sat.noarch
foreman-1.24.1.32-1.el7sat.noarch
STEPS TO REPRODUCE
run playbook
EXPECTED RESULTS
Host is created but the field "Synced Content" remains empty where it should mention the kickstart repo.
When starting the server the URL to the kickstart image is incorrect.
The used URL refers to a Library path instead of a lifecycle path (should be test in our case)
http://capsule_server/pulp/repos/organisation/Library/content/dist/rhel/server/7/7.6/x86_64/kickstart/images/pxeboot/vmlinuz... No such file or directory
The text was updated successfully, but these errors were encountered: