Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - hosts: localhost
- remote_user: root
- tasks:
- - name: Create PXE PXELinux Provisioning Template
- AnsibleForemanModule:
- username: admin
- password: password
- apiUrl: https://15.4.7.1
- verifySsl: false
- record:
- provisioning_template:
- name: PXE Provisioning Template
- template: '<%#
- kind: PXELinux
- name: XenServer default PXELinux
- model: ProvisioningTemplate
- oses:
- - XenServer
- %>
- <%
- os_version = @host.operatingsystem.major + "." + @host.operatingsystem.minor
- relative_install_media_path = @host.operatingsystem.name + "/" + os_version
- + "/os/" + @host.architecture.to_s + "/"
- boot_dir = relative_install_media_path + "boot/"
- xen = boot_dir + "xen.gz"
- kernel = boot_dir + "vmlinuz"
- initrd = relative_install_media_path + "install.img"
- %>
- <%= @xen %>
- default xenserver
- label xenserver
- kernel mboot.c32
- append <%= xen %> dom0_max_vcpus=1-2 dom0_mem=2046M,max:2046M com1=115200,8n1
- console=com1,vga --- <%= kernel -%> xencons=hvc console=hvc0 console=tty0
- answerfile=<%= foreman_url(''provision'')%> install --- <%= initrd %>
- IPAPPEND 2
- '
- snippet: false
- audit_comment: null
- template_kind_id: 5
- template_combinations_attributes: []
- operatingsystem_ids: []
- locked: false
- state: present
- register: provisioning_template_results
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement