售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
About Packt
Why subscribe?
Packt.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Conventions used
Get in touch
Reviews
Section 1: Creating a Web Server Using Ansible
Getting Started with Ansible
Technical requirements
IT automation
Advantages of IT automation
Disadvantages of IT automation
Types of IT automation
Agent-based systems
Agent-less systems
Agent-based versus agent-less systems
What is Ansible?
Secure Shell
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 Vagrant
Version control systems
Using Ansible with Git
Summary
Automating Simple Tasks
Technical Requirement
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
Section 2: Deploying Playbooks in a Production Environment
Scaling to Multiple Hosts
Technical requirements
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 inventories
Amazon Web Services
DigitalOcean
Working with iterates in Ansible
Using standard iteration – with_items
Using nested loops – with_nested
Fileglobs loop – with_fileglobs
Using an integer loop – with_sequence
Summary
Handling Complex Deployment
Technical requirements
Working with the local_action feature
Delegating a task
Working with conditionals
Boolean conditionals
Checking whether a variable is set
Working with include
Working with handlers
Working with roles
Organizing a project
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
The Ansible template – Jinja filters
Formatting data using filters
Defaulting undefined variables
Security management
Using Ansible Vault
Vaults and playbooks
Encrypting user passwords
Hiding passwords
Using no_log
Summary
Going Cloud
Technical requirements
Provisioning resources in the cloud
Provisioning machines in AWS
AWS global infrastructure
AWS Simple Storage Service
AWS Elastic Compute Cloud
AWS Virtual Private Cloud
AWS Route 53
AWS Elastic Block Storage
AWS Identity and Access Management
Amazon Relational Database Service
Setting up an account with AWS
Simple AWS deployment
Complex AWS deployment
Provisioning machines in DigitalOcean
Droplets
SSH key management
Private networking
Adding an SSH key in DigitalOcean
Deployment in DigitalOcean
Provisioning machines in Azure
Summary
Getting Notification from Ansible
Technical requirements
Sending emails with Ansible
XMPP
Slack
Rocket Chat
Internet Relay Chat
Amazon Simple Notification Service
Nagios
Summary
Section 3: Deploying an Application with Ansible
Creating a Custom Module
Prerequisite
Using Python to write modules
Working with exit_json and fail_json
Testing Python modules
Using bash modules
Using Ruby modules
Testing modules
Summary
Debugging and Error Handling
Technical requirements
Syntax checking
The check mode
Indicating differences between files using --diff
Functional testing in Ansible
Functional testing using assert
Testing with tags
Understanding the --skip-tags option
Understanding debugging commands
Managing exceptions
Trigger failure
Summary
Complex Environments
Technical requirements
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 a revision control system
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
Section 4: Deploying an Application with Ansible
Introducing Ansible for Enterprises
Technical requirements
Ansible on Windows
Ansible Galaxy
Pushing a role to Ansible Galaxy
Ansible Tower and AWX
Summary
Getting Started with AWX
Technical requirements
Setting up AWX
Installing Ansible, Docker, and Docker-py in Fedora
Giving the current user permission to use Docker in Fedora
Installing AWX
Creating new AWX projects
Using AWX inventories
Understanding AWX job templates
Using AWX jobs
Summary
Working with AWX Users, Permissions, and Organizations
Technical requirements
AWX users and permissions
AWX organizations
Summary
Other Books You May Enjoy
Leave a review - let other readers know what you think
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜