Project

General

Profile

Actions

Bug #4352

closed

Hammer cli cannot update template

Added by Etzion Bar-Noy almost 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Foreman commands (obsolete)
Target version:
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

Attempting to use a predefined file (example: discovery-pxe.txt) results in a success, however, the operation doesn't really happen. Below is a sequence of tasks, in the following order:
1. Show discovery-pxe.txt template file
2. Show current template dump (it's template id 2)
3. Import the file to template id 2
4. Show that the current template id 2 dump has not changed

  1. cat /var/share/config-files/discovery-pxe.txt
    <%# This template has special name (do not change it) and it is used for booting unknown hosts. %>

DEFAULT menu
PROMPT 0
MENU TITLE PXE Menu
TIMEOUT 200
TOTALTIMEOUT 6000
DEFAULT menu
PROMPT 0
MENU TITLE PXE Menu
TIMEOUT 200
TOTALTIMEOUT 6000
ONTIMEOUT discovery

LABEL discovery
MENU LABEL Boot Discovery
TEXT HELP
Boot the Foreman Discovery Image
Use TAB to edit options for specific needs.
ENDTEXT
KERNEL /boot/discovery
APPEND initrd=/boot/initrd.gz.1.0.0 foreman.ip=192.168.11.1

  1. hammer template dump --id 2
    <%#
    kind: PXELinux
    name: Community PXE Localboot
    %>

<%# This template has special name (do not change it) and it is used for booting already provisioned hosts. %>

DEFAULT menu
PROMPT 0
MENU TITLE PXE Menu
TIMEOUT 200
TOTALTIMEOUT 6000
ONTIMEOUT local

LABEL local
MENU LABEL (local)
MENU DEFAULT
LOCALBOOT 0

  1. hammer template update --id 2 --file /var/share/config-files/discovery-pxe.txt
    Config template updated
  1. hammer template dump --id 2
    <%#
    kind: PXELinux
    name: Community PXE Localboot
    %>

<%# This template has special name (do not change it) and it is used for booting already provisioned hosts. %>

DEFAULT menu
PROMPT 0
MENU TITLE PXE Menu
TIMEOUT 200
TOTALTIMEOUT 6000
ONTIMEOUT local

LABEL local
MENU LABEL (local)
MENU DEFAULT
LOCALBOOT 0

Actions

Also available in: Atom PDF