Let's make a change to the manifest and then use Git to see some information about it.
Edit the file
modules/nginx/manifests/init.pp
and find the section defining thenginx
service:service { 'nginx': ensure => running, require => Package['nginx'], }
Add the following line:
service { 'nginx': ensure => running, enable => true, require => Package['nginx'], }
Save the file and run the following command:
ubuntu@demo:~/puppet$ git status # On branch master # Changes not staged for commit: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: modules/nginx/manifests/init.pp # no changes added to commit (use "git add" and/or "git commit -a")
Use
git diff
to show you how the code differs from the snapshot taken at the last commit:ubuntu@demo:~/puppet$ git diff diff --git a/modules/nginx/manifests/init...