- Chef:Powerful Infrastructure Automation
- John Ewart Matthias Marschall Earl Waud
- 146字
- 2021-07-09 21:06:36
Adding users
We will need a recipe to manage our users; here, we will use the users
cookbook. We will create one user, webuser
, which will be the account that is used for deployment and user connectivity. We will define our user in a JSON file similar to what we did in the previous chapter; place the following in a users/webuser.json
file:
{ "id" : "webuser", "uid" : "1000", "gid" : 1000, "shell" : "/bin/bash", "comment" : "Webapp deployment user", "groups" : ["webusers"] }
Then, you can load this user using the from file
command:
knife data bag from file users users
Ensure that your hosts have our new users by editing the base_server
role and adding our webusers
group so that any users in that group will be provisioned on all our servers that incorporate the base_server
role:
{ "shell_users": { "group": "webusers", } }
推薦閱讀
- 數據展現的藝術
- Machine Learning for Cybersecurity Cookbook
- Python Algorithmic Trading Cookbook
- DevOps:Continuous Delivery,Integration,and Deployment with DevOps
- Hybrid Cloud for Architects
- JavaScript典型應用與最佳實踐
- Hands-On Reactive Programming with Reactor
- INSTANT Heat Maps in R:How-to
- 零起點學西門子S7-200 PLC
- INSTANT Munin Plugin Starter
- 云計算和大數據的應用
- 3ds Max造型表現藝術
- 中國戰略性新興產業研究與發展·數控系統
- 數據清洗
- 巧學活用Linux