0% found this document useful (0 votes)
2 views3 pages

Puppet Module Structure Guide

The document outlines the steps for creating a Puppet module, including setting up the module structure, writing the main class, adding metadata, and creating a subclass. It provides example code for the main class, metadata file, configuration class, and the site manifest. The overall goal is to organize and implement a simple Puppet module named 'myapp'.

Uploaded by

Ola Raja
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views3 pages

Puppet Module Structure Guide

The document outlines the steps for creating a Puppet module, including setting up the module structure, writing the main class, adding metadata, and creating a subclass. It provides example code for the main class, metadata file, configuration class, and the site manifest. The overall goal is to organize and implement a simple Puppet module named 'myapp'.

Uploaded by

Ola Raja
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Creating the Module Structure: "First, we'll create folders for our module.

Think of this as creating


folders for a project."

Writing the Main Class: "Next, we'll write the main class. This is like writing the main function in a
program."

Creating Metadata: "We'll add a metadata file. This is like adding a description to our project."

Adding a Subclass: "Now, we'll add a subclass. This is like adding another function to our program."

Updating the Main Puppet File: "Finally, we'll update the main Puppet file to use our new module.
This is like telling our program to run the functions we just wrote."

Content in [Link]-

class myapp {

file { '/tmp/[Link]':

ensure => present,

content => "This file was created by the myapp module\n",

Content in [Link]-

"name": "anmol-omar-myapp",

"version": "0.1.0",

"author": "anmol-omar",

"summary": "A simple myapp module",

"license": "Apache-2.0",

"source": "",

"dependencies": []

}
Content in [Link]-

class myapp::config {

file { '/etc/[Link]':

ensure => present,

content => "MyApp Configuration File\n",

Content in [Link]-

node default {

include myapp

include myapp::config

}
Agent(Slave) Machine-

You might also like