Skip to content

Commit 51f21ca

Browse files
authored
Merge pull request #6 from puppetlabs-operations/rename
Rename from puppet-cron to puppet-runner
2 parents 586d0aa + ab723b0 commit 51f21ca

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Wrapper for running the puppet agent from cron
1+
# A wrapper for running the puppet agent
22

33
Our workflow is to develop changes in feature branches, which become
44
environments. Once those branches are merged, they are deleted from the repo and
@@ -16,21 +16,21 @@ macOS, Solaris, and Windows.
1616

1717
### Linux, macOS, Solaris x86
1818

19-
Assuming you have installed this to `/usr/local/bin/puppet-cron`, create a cron job similar
19+
Assuming you have installed this to `/usr/local/bin/puppet-runner`, create a cron job similar
2020
to the one below. The reason for the path information is so that facts will be resolved
2121
correctly.
2222

2323
```bash
2424
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/puppetlabs/bin
25-
0,30 * * * * /usr/local/bin/puppet-cron
25+
0,30 * * * * /usr/local/bin/puppet-runner
2626
```
2727

2828
If there is an error, or if the environment is reset to `production`, the
2929
wrapper will write to stdout, and thus generate an email.
3030

3131
### Windows
3232

33-
Configure a scheduled task to run `puppet-cron` every thirty minutes.
33+
Configure a scheduled task to run `puppet-runner` every thirty minutes.
3434

3535
## Building
3636

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
module github.com/puppetlabs-operations/puppet-cron
1+
module github.com/puppetlabs-operations/puppet-runner
22

33
go 1.16

puppet-cron.go renamed to puppet-runner.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func isValidEnvironment(environment string) bool {
131131
// If it doesn't, revert to the `production` envionment. Once the check
132132
// and any needed update is complete, run the puppet agent.
133133
func main() {
134-
log.Print("Starting puppet-cron...")
134+
log.Print("Starting puppet-runner...")
135135
environment := puppetConfigGet("agent", "environment")
136136
puppetArgs := []string{"agent", "--no-daemonize", "--onetime"}
137137

@@ -140,7 +140,7 @@ func main() {
140140
puppetConfigSet("agent", "environment", "production")
141141
}
142142

143-
if os.Getenv("PUPPET_CRON_DEBUG") != "" {
143+
if os.Getenv("PUPPET_RUNNER_DEBUG") != "" {
144144
log.Printf("Current value of $PATH: %s", os.Getenv("PATH"))
145145
}
146146

0 commit comments

Comments
 (0)