I have foreman-proxy and would like to create a TFTP record for a host. The
API at http://projects.theforeman.org/projects/smart-proxy/wiki/API says
/tftp/00:11:22:33:44:55 POST creates pxelinux configuration file for host
with MAC address 00:11:22:33:44:55 {"syslinux_config":string}. Implicit
variant of "syslinux"I want to create a file which contains like
DEFAULT menu.c32
MENU TITLE ESXi Installer
NOHALT 1
PROMPT 0
TIMEOUT 80
LABEL install
KERNEL images/ESXiv6.5/mboot.c32
APPEND -c images/ESXiv6.5/boot.cfg
MENU LABEL ESXi-6.5.0.-4564106-full ^Installer
LABEL hddboot
LOCALBOOT 0x80
MENU LABEL ^Boot from local disk
How do I achieve this using API. I have tried
curl -k -u admin:secret -H "Accept:pplication/json" --cacert /etc/puppetlabs
/puppet/ssl/certs/ca.pem --cert /etc/puppetlabs/puppet/ssl/certs/foreman.
localdomain.pem --key /etc/puppetlabs/puppet/ssl/private_keys/foreman.
localdomain.pem -X POST https://foreman:8443/tftp/00:11:22:33:44:55 --data
@sample.json
My sample.json is like
syslinux_config=DEFAULT menu.c32
MENU TITLE Cloudsimple ESXi Installer
NOHALT 1
PROMPT 0
.....
But this doesn't maintain the multiline format. How I achieve this ?
--
You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.