Problem:
I am attempting to output data to a file in the iPXE Provisioning template, but nothing seems to work. Here are a few of the things I have tried:
Echo data into the file:
echo "hello world" > /path/to/file
Expected output:
“hello world” is outputted into path/to/file
Actual output:
iPXE screen prints "hello world" > /path/to/file
Ruby File.write() function (yes, safemode is off):
File.open(/path/to/file, 'w') { |file| file.write("hello world") }
Expected output
“hello world” is outputted into path/to/file
Actual output:
iPXE screen displays error that the function is not found
Foreman and Proxy versions:
Foreman 3.5.1.17‑1
Foreman and Proxy plugin versions:
ansible-collection-redhat-satellite-3.9.0-2.el8sat.noarch
ansible-collection-redhat-satellite_operations-1.3.0-2.el8sat.noarch
ansiblerole-foreman_scap_client-0.2.0-2.el8sat.noarch
candlepin-4.2.13-1.el8sat.noarch
candlepin-selinux-4.2.13-1.el8sat.noarch
foreman-3.5.1.17-1.el8sat.noarch
foreman-bootloaders-redhat-202102220000-1.el8sat.noarch
foreman-bootloaders-redhat-tftpboot-202102220000-1.el8sat.noarch
foreman-cli-3.5.1.17-1.el8sat.noarch
foreman-debug-3.5.1.17-1.el8sat.noarch
foreman-dynflow-sidekiq-3.5.1.17-1.el8sat.noarch
foreman-ec2-3.5.1.17-1.el8sat.noarch
foreman-installer-3.5.2.1-1.el8sat.noarch
foreman-installer-katello-3.5.2.1-1.el8sat.noarch
foreman-libvirt-3.5.1.17-1.el8sat.noarch
foreman-obsolete-packages-1.1-1.el8sat.noarch
foreman-openstack-3.5.1.17-1.el8sat.noarch
foreman-ovirt-3.5.1.17-1.el8sat.noarch
foreman-postgresql-3.5.1.17-1.el8sat.noarch
foreman-proxy-3.5.1-1.el8sat.noarch
foreman-selinux-3.5.1-1.el8sat.noarch
foreman-service-3.5.1.17-1.el8sat.noarch
foreman-vmware-3.5.1.17-1.el8sat.noarch
katello-4.7.0-1.el8sat.noarch
katello-certs-tools-2.9.0-1.el8sat.noarch
katello-client-bootstrap-1.7.9-1.el8sat.noarch
katello-common-4.7.0-1.el8sat.noarch
katello-debug-4.7.0-1.el8sat.noarch
katello-selinux-4.0.2-2.el8sat.noarch
pulpcore-selinux-1.3.2-1.el8pc.x86_64
puppet-foreman_scap_client-0.4.0-1.el8sat.noarch
python39-pulp-ansible-0.15.0-1.el8pc.noarch
python39-pulp-certguard-1.5.5-1.el8pc.noarch
python39-pulp-cli-0.14.0-4.el8pc.noarch
python39-pulp-container-2.14.3-1.el8pc.noarch
python39-pulp-file-1.11.1-1.el8pc.noarch
python39-pulp-rpm-3.18.14-1.el8pc.noarch
python39-pulpcore-3.21.6-1.el8pc.noarch
qpid-proton-c-0.33.0-4.el8.x86_64
rubygem-foreman-tasks-7.2.1-1.el8sat.noarch
rubygem-foreman_ansible-10.4.0-1.el8sat.noarch
rubygem-foreman_azure_rm-2.2.7-1.el8sat.noarch
rubygem-foreman_bootdisk-21.0.3-1.1.el8sat.noarch
rubygem-foreman_discovery-22.0.2-1.1.el8sat.noarch
rubygem-foreman_google-1.0.3-1.el8sat.noarch
rubygem-foreman_hooks-0.3.17-3.1.el8sat.noarch
rubygem-foreman_leapp-0.1.13-1.el8sat.noarch
rubygem-foreman_maintain-1.2.8-1.el8sat.noarch
rubygem-foreman_openscap-5.2.3-1.el8sat.noarch
rubygem-foreman_puppet-5.0.0-1.el8sat.noarch
rubygem-foreman_remote_execution-8.3.0-1.el8sat.noarch
rubygem-foreman_rh_cloud-7.0.45-1.el8sat.noarch
rubygem-foreman_templates-9.3.0-2.1.el8sat.noarch
rubygem-foreman_theme_satellite-11.0.0.5-1.el8sat.noarch
rubygem-foreman_virt_who_configure-0.5.13-1.el8sat.noarch
rubygem-foreman_webhooks-3.0.5-1.1.el8sat.noarch
rubygem-hammer_cli-3.5.1-1.el8sat.noarch
rubygem-hammer_cli_foreman-3.5.1-1.el8sat.noarch
rubygem-hammer_cli_foreman_admin-1.1.0-1.el8sat.noarch
rubygem-hammer_cli_foreman_ansible-0.4.0-2.el8sat.noarch
rubygem-hammer_cli_foreman_azure_rm-0.2.2-1.el8sat.noarch
rubygem-hammer_cli_foreman_bootdisk-0.3.0-3.el8sat.noarch
rubygem-hammer_cli_foreman_discovery-1.1.0-1.el8sat.noarch
rubygem-hammer_cli_foreman_google-1.0.0-1.el8sat.noarch
rubygem-hammer_cli_foreman_openscap-0.1.13-2.el8sat.noarch
rubygem-hammer_cli_foreman_puppet-0.0.6-1.el8sat.noarch
rubygem-hammer_cli_foreman_remote_execution-0.2.2-1.el8sat.noarch
rubygem-hammer_cli_foreman_tasks-0.0.18-1.el8sat.noarch
rubygem-hammer_cli_foreman_templates-0.2.0-3.el8sat.noarch
rubygem-hammer_cli_foreman_virt_who_configure-0.0.9-2.el8sat.noarch
rubygem-hammer_cli_foreman_webhooks-0.0.4-1.el8sat.noarch
rubygem-hammer_cli_katello-1.7.3-1.el8sat.noarch
rubygem-katello-4.7.0.25-1.el8sat.noarch
rubygem-pulp_ansible_client-0.15.0-1.el8sat.noarch
rubygem-pulp_certguard_client-1.5.5-1.el8sat.noarch
rubygem-pulp_container_client-2.14.2-1.el8sat.noarch
rubygem-pulp_deb_client-2.20.0-1.el8sat.noarch
rubygem-pulp_file_client-1.11.2-1.el8sat.noarch
rubygem-pulp_ostree_client-2.0.0-0.1.a1.el8sat.noarch
rubygem-pulp_python_client-3.7.3-1.el8sat.noarch
rubygem-pulp_rpm_client-3.18.7-1.el8sat.noarch
rubygem-pulpcore_client-3.21.2-1.el8sat.noarch
rubygem-qpid_proton-0.33.0-5.el8sat.x86_64
rubygem-smart_proxy_pulp-3.2.0-3.el8sat.noarch
satellite-6.13.1-1.el8sat.noarch
satellite-cli-6.13.1-1.el8sat.noarch
satellite-common-6.13.1-1.el8sat.noarch
satellite-installer-6.13.0.7-1.el8sat.noarch
satellite-maintain-0.0.1-1.el8sat.noarch
Other relevant data:
What I am REALLY trying to do is output the generation of a snippet to a file.
I am using Red Hat Satellite, but it is based on Foreman so I thought to ask here.