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-