About | FAQ | Help
Ask Your Question

how to generate a token using puppet access in a non interactive mode

asked 2018-01-26 17:46:30 -0500

nadish gravatar image

updated 2018-01-26 17:54:01 -0500

My script uses puppet run task commands. for the script to work i need to provide authentication token. so I generate a token using puppet access command but I want to make it non interactive by passing the username and password in the command as below, to run my script.

works:puppet-access login --lifetime 1h --username $user

fails:puppet-access login --lifetime 1h --username $user --password $password

Can anyone please help me.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-01-27 14:12:00 -0500

reesek gravatar image

Within your script, you can generate a token via the RBAC API. Take a look at this thread that explains that process: https://ask.puppet.com/question/32559...

From there, you should be able to use the --token-file option to the puppet task command.

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


Asked: 2018-01-26 17:46:30 -0500

Seen: 84 times

Last updated: Jan 27