设为首页 收藏本站
查看: 824|回复: 0

[经验分享] playbook之ansible

[复制链接]

尚未签到

发表于 2018-7-29 10:07:09 | 显示全部楼层 |阅读模式
  [ansible-playbook组件解析及操作全解](http://www.178linux.com/7001)
[Ansible playbook简单示例](http://blog.csdn.net/chengyuqiang/article/details/78529454)

  
  [Ansible(二):Ansible之剧本(Playbooks)](http://blog.csdn.net/alphags/article/details/53334508)
  [ANSIBLE PLAYBOOKS](https://www.cnblogs.com/mhc-fly/p/7081621.html)
ansible playbook最佳实践                        
  http://blog.csdn.net/kellyseeme/article/details/50574340
Playbooks
  Playbooks are Ansible’s configuration, deployment, and orchestration language.  They can describe a policy you want your remote systems to enforce, or a set of steps in a general IT process.
  If Ansible modules are the tools in your workshop, playbooks are yourinstruction manuals, and your inventory of hosts are your raw material.
  At a basic level, playbooks can be used to manage configurations of and deployments to remote machines.  At a more advanced level, they can sequence multi-tier rollouts involving rolling updates, and can delegateactions to other hosts, interacting with monitoring servers and load balancers along the way.
  While there’s a lot of information here, there’s no need to learn everything at once.  You can start small and pick up more featuresover time as you need them.
  Playbooks are designed to be human-readable and are developed in a basic text language.  There are multipleways to organize playbooks and the files they include, and we’ll offer up some suggestions on that and making the most out of Ansible.
  It is recommended to look at Example Playbookswhile reading along with the playbook documentation.  These illustrate best practices as well as how to put many of the various concepts together.

  •   Intro to Playbooks

    •   About Playbooks
    •   Playbook Language Example
    •   Basics
    •   Action Shorthand
    •   Handlers: Running Operations On Change
    •   Executing A Playbook
    •   Ansible-Pull
    •   Tips and Tricks

  •   Creating Reusable Playbooks

    •   Including and Importing
    •   Roles
    •   Dynamic vs. Static
    •   Differences Between Static and Dynamic
    •   Tradeoffs and Pitfalls Between Includes and Imports

  •   Variables

    •   What Makes A Valid Variable Name
    •   Variables Defined in Inventory
    •   Variables Defined in a Playbook
    •   Variables defined from included files and roles
    •   Using Variables: About Jinja2
    •   Jinja2 Filters
    •   Hey Wait, A YAML Gotcha
    •   Information discovered from systems: Facts
    •   Turning Off Facts
    •   Local Facts (Facts.d)
    •   Ansible version
    •   Fact Caching
    •   Registered Variables
    •   Accessing Complex Variable Data
    •   Magic Variables, and How To Access Information About Other Hosts
    •   Variable File Separation
    •   Passing Variables On The Command Line
    •   Variable Precedence: Where Should I Put A Variable?
    •   Variable Scopes
    •   Variable Examples
    •   Advanced Syntax

  •   Templating (Jinja2)

    •   Filters
    •   Tests
    •   Lookups
    •   Examples
    •   Python Version and Templating

  •   Conditionals

    •   The When Statement
    •   Loops and Conditionals
    •   Loading in Custom Facts
    •   Applying ‘when’ to roles, imports, and includes
    •   Conditional Imports
    •   Selecting Files And Templates Based On Variables
    •   Register Variables

  •   Loops

    •   Standard Loops
    •   Nested Loops
    •   Looping over Hashes
    •   Looping over Files
    •   Looping over Fileglobs
    •   Looping over Filetrees
    •   Looping over Parallel Sets of Data
    •   Looping over Subelements
    •   Looping over Integer Sequences
    •   Random Choices
    •   Do-Until Loops
    •   Finding First Matched Files
    •   Iterating Over The Results of a Program Execution
    •   Looping Over A List With An Index
    •   Using ini file with a loop
    •   Flattening A List
    •   Using register with a loop
    •   Looping over the inventory
    •   Loop Control
    •   Loops and Includes in 2.0
    •   Writing Your Own Iterators

  •   Blocks

    •   Error Handling

  •   Strategies

    •   Strategy Plugins

  •   Best Practices

    •   Content Organization
    •   Staging vs Production
    •   Rolling Updates
    •   Always Mention The State
    •   Group By Roles
    •   Operating System and Distribution Variance
    •   Bundling Ansible Modules With Playbooks
    •   Whitespace and Comments
    •   Always Name Tasks
    •   Keep It Simple
    •   Version Control
    •   Variables and Vaults


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-542892-1-1.html 上篇帖子: suse12安装ansible-12016900 下篇帖子: ansible批量修改sshd_config
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表