- 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", } }
推薦閱讀
- 大學計算機信息技術導論
- Practical Ansible 2
- 控制與決策系統仿真
- Docker Quick Start Guide
- 人工智能趣味入門:光環板程序設計
- Lightning Fast Animation in Element 3D
- 基于企業網站的顧客感知服務質量評價理論模型與實證研究
- Mastering MongoDB 3.x
- Puppet 3 Beginner’s Guide
- 電氣控制及Micro800 PLC程序設計
- EJB JPA數據庫持久層開發實踐詳解
- 計算機硬件技術基礎學習指導與練習
- Mastering Microsoft Dynamics 365 Customer Engagement
- Robust Cloud Integration with Azure
- KUKA工業機器人與西門子S7-1200 PLC技術及應用