Ask Your Question
-1

run puppet agent environment HOWTO?

asked 2016-01-30 12:35:45 -0500

nobody gravatar image

updated 2016-01-31 11:04:59 -0500

Hi there! If i daemonize my puppet agent, how i can use environments? Example: Now i launch my puppet agents on cron

    */30  *  * * *  root    /usr/bin/screen -A -m -d -S puppet1 /usr/bin/puppet agent --onetime --no-daemonize --splaylimit=0 > /dev/null 2>&1
    */28  *  * * *  root    /usr/bin/screen -A -m -d -S puppet2 /usr/bin/puppet agent --onetime --no-daemonize --splaylimit=0 --environment ip > /dev/null 2>&1
    #

How i can use same commands in daemonized mode on different versions client (3., 4.)?

UPDATE O-O-O-OR maybe i can execute my "--environment ip" and all manifests in /etc/puppetlabs/code/environments/production/manifests after/before?

P.S. Some server info: http://pastebin.com/6y268n8g

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-01-30 13:49:59 -0500

Red Cricket gravatar image

I believe you can set your agent's environment in its puppet.conf file.

edit flag offensive delete link more

Comments

Nope, if i set in puppet.conf "environment=ip", puppet execute ONLY this environment and nothing more. As I said earlier, i need than puppet first execute "puppet agent --onetime --no-daemonize --splaylimit=0" (it's necessarily for all my servers), and only then execute "environment=ip". Possible?

nobody gravatar imagenobody ( 2016-01-31 02:09:54 -0500 )edit
0

answered 2016-01-31 02:09:44 -0500

nobody gravatar image

updated 2016-01-31 02:57:21 -0500

Nope, if i set in puppet.conf "environment=ip", puppet execute ONLY this environment and nothing more. As i said earlier, i need that puppet first execute "puppet agent --onetime --no-daemonize --splaylimit=0" (it's necessarily for all my servers - run puppet without any options first), and only then execute "environment=ip". It is possible?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-01-30 12:35:45 -0500

Seen: 316 times

Last updated: Jan 31 '16