售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Learning Ansible 2 Second Edition
Learning Ansible 2 Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with Ansible
IT automation
The history of IT automation
Advantages of IT automation
Disadvantages of IT automation
Limiting the possible damages of an error propagation
Types of IT automation
Agent-based systems
Agent-less systems
Agent-based versus Agent-less systems
What is Ansible?
Secure Shell (SSH)
Why Ansible?
Installing Ansible
Installing Ansible using the system's package manager
Installing via Yum
Installing via Apt
Installing via Homebrew
Installing via pip
Installing Ansible from source
Creating a test environment with QEMU and KVM
Version control system
Using Ansible with Git
Summary
2. Automating Simple Tasks
YAML
Hello Ansible
Working with playbooks
Studying the anatomy of a playbook
Running a playbook
Ansible verbosity
Variables in playbooks
Creating the Ansible user
Configuring a basic server
Enabling EPEL
Installing Python bindings for SELinux
Upgrading all installed packages
Ensuring that NTP is installed, configured, and running
Ensuring that FirewallD is present and enabled
Adding a customized MOTD
Changing the hostname
Reviewing and running the playbook
Installing and configuring a web server
Publishing a website
Jinja2 templates
Variables
Filters
Conditionals
Cycles
Summary
3. Scaling to Multiple Hosts
Working with inventory files
The basic inventory file
Groups in an inventory file
Regular expressions in the inventory file
Working with variables
Host variables
Group variables
Variable files
Overriding configuration parameters with an inventory file
Working with dynamic inventory
Amazon Web Services
DigitalOcean
Working with iterates in Ansible
Standard iteration - with_items
Nested loops - with_nested
Fileglobs loop - with_fileglobs
Integer loop - with_sequence
Summary
4. Handling Complex Deployment
Working with the local_action feature
Delegating a task
Working with conditionals
Boolean conditionals
Checking if a variable is set
Working with include
Working with handlers
Working with roles
Project organization
Anatomy of a role
Transforming your playbooks in a full Ansible project
Transforming a playbook into a role
Helper files
Transforming the webserver role
Handlers in roles
Execution strategies
Tasks blocks
The Ansible template - Jinja filters
Formatting data using filters
Using filters with conditionals
Defaulting undefined variables
Security management
Using Ansible vault
Vaults and playbooks
Encrypting user passwords
Hiding passwords
Using no_log
Summary
5. Going Cloud
Provisioning resources in the cloud
Amazon Web Service
AWS global infrastructure
AWS Simple Storage Service
AWS Elastic Compute Cloud (EC2)
AWS Virtual Private Cloud (VPC)
AWS Route 53
AWS Elastic Block Storage (EBS)
AWS Identity and Access Management
Amazon relational database service
Setting up an account with AWS
Simple AWS deployment
Complex AWS deployment
DigitalOcean
Droplets
SSH key management
Private networking
Adding an SSH key in DigitalOcean
Deployment in DigitalOcean
Summary
6. Getting Notifications from Ansible
E-mails
XMPP
Slack
Rocket Chat
Internet Relay Chat (IRC)
Amazon Simple Notification Service
Nagios
Summary
7. Creating a Custom Module
Using Python modules
Working with exit_json and fail_json
Testing Python modules
Using bash modules
Using Ruby modules
Testing modules
Summary
8. Debugging and Error Handling
The check mode
Indicating differences between files using --diff
Functional testing in Ansible
Functional testing using assert
Testing with tags
The --skip-tags
Managing exceptions
Trigger failure
Summary
9. Complex Environments
Code based on the Git branch
A single stable branch with multiple folders
Software distribution strategy
Copying files from the local machine
Revision control system with branches
Revision control system with tags
RPM packages
Preparing the environment
Deploying a web app with revision control systems
Deploying a web app with RPM packages
Creating a Spec file
Building RPMs manually
Building RPMs with Ansible
Building RPMs with CI/CD pipelines
Building compiled software with RPM packaging
Deployment strategies
Canary deployment
Blue/Green deployment
Optimizations
Pipelining
Optimizing with_items
Understanding what happens when your tasks are executed
Summary
10. Introducing Ansible for Enterprises
Ansible on Windows
Ansible for networking devices
Ansible Galaxy
Ansible Tower
Summary
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜