Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
b47bc343
Commit
b47bc343
authored
Sep 17, 2015
by
Abhijit Menon-Sen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document , instead of : in intro_patterns, update changelog
parent
abd00665
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
CHANGELOG.md
+4
-2
docsite/rst/intro_patterns.rst
+7
-7
No files found.
CHANGELOG.md
View file @
b47bc343
...
...
@@ -22,6 +22,10 @@ Major Changes:
They will retain the value of
`None`
. To go back to the old behaviour, you can override
the
`null_representation`
setting to an empty string in your config file or by setting the
`ANSIBLE_NULL_REPRESENTATION`
environment variable.
*
Use "pattern1,pattern2" to combine host matching patterns. The use of
':' as a separator is deprecated (accepted with a warning) because it
conflicts with IPv6 addresses. The undocumented use of ';' as a
separator is no longer supported.
*
Backslashes used when specifying parameters in jinja2 expressions in YAML
dicts sometimes needed to be escaped twice. This has been fixed so that
escaping once works. Here's an example of how playbooks need to be modified:
...
...
@@ -252,8 +256,6 @@ Minor changes:
*
Many more tests. The new API makes things more testable and we took advantage of it.
*
big_ip modules now support turning off ssl certificate validation (use only for self-signed certificates).
*
Use "pattern1:pattern2" to combine host matching patterns. The undocumented
use of semicolons or commas to combine patterns is no longer supported.
*
Use
``hosts: groupname[x:y]``
to select a subset of hosts in a group; the
``[x-y]``
range syntax is no longer supported. Note that
``[0:1]``
matches
two hosts, i.e. the range is inclusive of its endpoints.
...
...
docsite/rst/intro_patterns.rst
View file @
b47bc343
...
...
@@ -27,7 +27,7 @@ The following patterns are equivalent and target all hosts in the inventory::
It is also possible to address a specific host or set of hosts by name::
one.example.com
one.example.com
:
two.example.com
one.example.com
,
two.example.com
192.168.1.50
192.168.1.*
...
...
@@ -35,20 +35,20 @@ The following patterns address one or more groups. Groups separated by a colon
This means the host may be in either one group or the other::
webservers
webservers
:
dbservers
webservers
,
dbservers
You can exclude groups as well, for instance, all machines must be in the group webservers but not in the group phoenix::
webservers
:
!phoenix
webservers
,
!phoenix
You can also specify the intersection of two groups. This would mean the hosts must be in the group webservers and
the host must also be in the group staging::
webservers
:
&staging
webservers
,
&staging
You can do combinations::
webservers
:dbservers:&staging:
!phoenix
webservers
,dbservers,&staging,
!phoenix
The above configuration means "all machines in the groups 'webservers' and 'dbservers' are to be managed if they are in
the group 'staging' also, but the machines are not to be managed if they are in the group 'phoenix' ... whew!
...
...
@@ -56,7 +56,7 @@ the group 'staging' also, but the machines are not to be managed if they are in
You can also use variables if you want to pass some group specifiers via the "-e" argument to ansible-playbook, but this
is uncommonly used::
webservers
:!{{excluded}}:
&{{required}}
webservers
,!{{excluded}},
&{{required}}
You also don't have to manage by strictly defined groups. Individual host names, IPs and groups, can also be referenced using
wildcards::
...
...
@@ -66,7 +66,7 @@ wildcards::
It's also ok to mix wildcard patterns and groups at the same time::
one*.com
:
dbservers
one*.com
,
dbservers
You can select a host or subset of hosts from a group by their position. For example, given the following group::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment