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
1a6e959f
Commit
1a6e959f
authored
Feb 23, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2188 from lorin/docfix
Add a missing :: in an .rst file
parents
908a1927
2e8533ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
docsite/rst/playbooks2.rst
+8
-8
No files found.
docsite/rst/playbooks2.rst
View file @
1a6e959f
...
...
@@ -600,7 +600,7 @@ The environment can also be stored in a variable, and accessed like so::
http_proxy=http://proxy.example.com:8080
tasks:
- apt: name=cobbler state=installed
environment: $proxy_env
...
...
@@ -954,7 +954,7 @@ As a review, most tasks in ansbile are of this form::
- name: ensure the cobbler package is installed
yum: name=cobbler state=installed
However, in some cases, it may be useful to feed arguments directly in from a hash (dictionary). In fact, a very small
number of modules (the CloudFormations module is one) actually require complex arguments that can't be fit
into a key=value system. To pass arguments in from a hash (dictionary), do this::
...
...
@@ -972,8 +972,8 @@ into a key=value system. To pass arguments in from a hash (dictionary), do this
my_pets:
dogs:
- fido
- woof
fish:
- woof
fish:
- limpet
- nemo
...
...
@@ -992,13 +992,13 @@ In above sections we talked about task includes, and how to do loops using with_
to externalize data from the playbook rules itself, this is possible by combining some concepts.
This is not something everyone may need to do at first, but it's a clever trick and deserves explanation.
Here is a top level example playbook that loads variables from an external file and also tasks from an
Here is a top level example playbook that loads variables from an external file and also tasks from an
external file. You will note that we use a list (using with_items) as a parameter on the include
statement
.
statement
::
----
# file: playbook-demo.yml
hosts: all
vars_files:
- config/users.yml
...
...
@@ -1018,7 +1018,7 @@ them in the file instead. It's up to you::
- name: alice
password: cryptedPasswordHere
sshkey: $FILE(/home/alice/id_rsa.pub)
- name: bob
password: cryptedPasswordHere
sshkey: $FILE(/home/bob/id_rsa.pub)
...
...
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