Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoLocation is thrown when no location is provided for the Playbook file ErrNoLocation = fmt.Errorf("playbook location was not provided") // ErrReadFile is thrown when the Playbook file cannot be read/accessed ErrReadFile = fmt.Errorf("could not read playbook file") // ErrTextTplParsing is thrown when the templates in the Playbook file cannot be parsed. // // E.g. {{ Env "Hostname" }} ErrTextTplParsing = fmt.Errorf("failed to parse the playbook file") // ErrFileUnmarshall is thrown when the content of the Playbook file cannot be successfully unmarshalled into a domain.Playbook object ErrFileUnmarshall = fmt.Errorf("failed to unmarshal the playbook file") )
Functions ¶
func ReadPlaybook ¶
ReadPlaybook reads the file in location, parses the content and returns a Playbook object
func ReadPlaybookRaw ¶
ReadPlaybookRaw reads the file in location and parses the content to a map.
This is specially useful to avoid parsing the template values in the file
func WritePlaybook ¶
WritePlaybook takes an object and serializes it to a file in the given location
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.