Ansible 提供一种最简单的方式用于发布、管理和编排计算机系统的工具,你可在数分钟内搞定。
Ansible 是一个模型驱动的配置管理器,支持多节点发布、远程任务执行。默认使用 SSH 进行远程连接。无需在被管理节点上安装附加软件,可使用各种编程语言进行扩展。
Ansible 1.4 改进记录包括:
新特性:
Added do-until feature, which can be used to retry a failed task a specified number of times with a delay in-between the retries.
Added failed_when option for tasks, which can be used to specify logical statements that make it easier to determine when a task has failed, or to make it easier to ignore certain non-zero return codes for some commands.
Added the "subelement" lookup plugin, which allows iteration of the keys of a dictionary or items in a list.
Added the capability to use either paramiko or ssh for the inital setup connection of an accelerated playbook.
Automatically provide advice on common parser errors users encounter.
Deprecation warnings are now shown for legacy features: when_integer/etc, only_if, include+with_items, etc. Can be disabled in ansible.cfg
The system will now provide helpful tips around possible YAML syntax errors increasing ease of use for new users.
warnings are now shown for using {{ foo }} in loops and conditionals, and suggest leaving the variable expressions bare as per docs.
The roles search path is now configurable in ansible.cfg. 'roles_path' in the config setting.
Includes with parameters can now be done like roles for consistency: - { include: song.yml, year:1984, song:'jump' }
The name of each role is now shown before each task if roles are being used
Adds a "var=" option to the debug module for debugging variable data. "debug: var=hostvars['hostname']" and "debug: var=foo" are all valid syntax.
Variables in {{ format }} can be used as references even if they are structured data
Can force binding of accelerate to ipv6 ports.
the apt module will auto-install python-apt if not present rather than requiring a manual installation
the copy module is now recursive if the local 'src' parameter is a directory.
syntax checks now scan included task and variable files as well as main files
新模块和插件
cloud: ec2_eip -- manage AWS elastic IPs
cloud: ec2_vpc -- manage ec2 virtual private clouds
cloud: elasticcache -- Manages clusters in Amazon Elasticache
cloud: rax_network -- sets up Rackspace networks
cloud: rax_facts: retrieve facts about a Rackspace Cloud Server
cloud: rax_clb_nodes -- manage Rackspace cloud load balanced nodes
cloud: rax_clb -- manages Rackspace cloud load balancers
cloud: docker - instantiates/removes/manages docker containers
cloud: ovirt -- VM lifecycle controls for ovirt
files: acl -- set or get acls on a file
files: unarchive: pushes and extracts tarballs
files: synchronize: a useful wraper around rsyncing trees of files
system: firewalld -- manage the firewalld configuration
system: modprobe -- manage kernel modules on systems that support modprobe/rmmod
system: open_iscsi -- manage targets on an initiator using open-iscsi
system: blacklist: add or remove modules from the kernel blacklist
system: hostname - sets the systems hostname
utilities: include_vars -- dynamically load variables based on conditions.
packaging: zypper_repository - adds or removes Zypper repositories
packaging: urpmi - work with urpmi packages
packaging: swdepot - a module for working with swdepot
notification: grove - notifies to Grove hosted IRC channels
web_infrastructure: ejabberd_user: add and remove users to ejabberd
web_infrastructure: jboss: deploys or undeploys apps to jboss
source_control: github_hooks: manages GitHub service hooks
net_infrastructure: bigip_monitor_http: manages F5 BIG-IP LTM http monitors
net_infrastructure: bigip_monitor_tcp: manages F5 BIG-IP LTM TCP monitors
net_infrastructure: bigip_pool_member: manages F5 BIG-IP LTM pool members
net_infrastructure: bigip_node: manages F5 BIG-IP LTM nodes
net_infrastructure: openvswitch_port
net_infrastructure: openvswitch_bridge
插件:
jail connection module (FreeBSD)
lxc connection module
added inventory script for listing FreeBSD jails
added md5 as a Jinja2 filter: {{ path | md5 }}
added a fileglob filter that will return files matching a glob pattern. with_items: "/foo/pattern/*.txt | fileglob"
'changed' filter returns whether a previous step was changed easier. when: registered_result | changed
DOCS NEEDED: 'unique' and 'intersect' filters are added for dealing with lists.
DOCS NEEDED: new lookup plugin added for etcd
a 'func' connection type to help people migrating from func/certmaster.
杂项
(docs pending) New features for accelerate mode: configurable timeouts and a keepalives for long running tasks.
Added a delimiter field to the assemble module.
Added ansible_env to the list of facts returned by the setup module.
Added state=touch to the file module, which functions similarly to the command-line version of touch.
Added a -vvvv level, which will show SSH client debugging information in the event of a failure.
Includes now support the more standard syntax, similar to that of role includes and dependencies.
Changed the user: parameter on plays to remote_user: to prevent confusion with the module of the same name. Still backwards compatible on play parameters.
Added parameter to allow the fetch module to skip the md5 validation step ('validate_md5=false'). This is usefull when fetching files that are actively being written to, such as live log files.
Inventory hosts are used in the order they appear in the inventory.
in hosts: foo[2-5] type syntax, the iterators now are zero indexed and the last index is non-inclusive, to match Python standards.
There is now a way for a callback plugin to disable itself. See osx_say example code for an example.
Many bugfixes to modules of all types.
Complex arguments now can be used with async tasks
SSH ControlPath is now configurable in ansible.cfg. There is a limit to the lengths of these paths, see how to shorten them in ansible.cfg.
md5sum support on AIX with csum.
Extremely large documentation refactor into subchapters
Added 'append_privs' option to the mysql_user module
Can now update (temporarily change) host variables using the "add_host" module for existing hosts.
Fixes for IPv6 addresses in inventory text files
name of executable can be passed to pip/gem etc, for installing under different interpreters
copy of ./hacking/env-setup added for fish users, ./hacking/env-setup.fish
file module more tolerant of non-absolute paths in softlinks.
miscellaneous fixes/upgrades to async polling logic.
conditions on roles now pass to dependent roles
ansible_sudo_pass can be set in a host variable if desired
misc fixes for the pip an easy_install modules
support for running handlers that have parameterized names based on role parameters
added support for compressing MySQL dumps and extracting during import
Boto version compatibility fixes for the EC2 inventory script
in the EC2 inventory script, a group 'EC2' and 'RDS' contains EC2 and RDS hosts.
umask is enforced by the cron module
apt packages that are not-removed and not-upgraded do not count as changes
the assemble module can now use src files from the local server and copy them over dynamically
authorization code has been standardized between Amazon cloud modules
the wait_for module can now also wait for files to exist or a regex string to exist in a file
leading ranges are now allowed in ranged hostname patterns, ex: [000-250].example.com
pager support added to ansible-doc (so it will auto-invoke less, etc)
misc fixes to the cron module
get_url module now understands content-disposition headers for deciding filenames
it is possible to have subdirectories in between group_vars/ and host_vars/ and the final filename, like host_vars/rack42/asdf for the variables for host 'asdf'. The intermediate directories are ignored, and do not put a file in there twice.
项目主页:http://www.ansibleworks.com/
来自:开源中国社区

