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
687753e4
Commit
687753e4
authored
Sep 18, 2013
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing up some search/replace errors regarding user/remote_user
parent
39659db7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
docsite/latest/rst/playbooks2.rst
+6
-6
No files found.
docsite/latest/rst/playbooks2.rst
View file @
687753e4
...
...
@@ -467,7 +467,7 @@ Loops
To save some typing, repeated tasks can be written in short-hand like so::
- name: add several users
remote_
user: name={{ item }} state=present groups=wheel
user: name={{ item }} state=present groups=wheel
with_items:
- testuser1
- testuser2
...
...
@@ -479,9 +479,9 @@ If you have defined a YAML list in a variables file, or the 'vars' section, you
The above would be the equivalent of::
- name: add user testuser1
remote_
user: name=testuser1 state=present groups=wheel
user: name=testuser1 state=present groups=wheel
- name: add user testuser2
remote_
user: name=testuser2 state=present groups=wheel
user: name=testuser2 state=present groups=wheel
The yum and apt modules use with_items to execute fewer package manager transactions.
...
...
@@ -489,7 +489,7 @@ Note that the types of items you iterate over with 'with_items' do not have to b
If you have a list of hashes, you can reference subkeys using things like::
- name: add several users
remote_
user: name={{ item.name }} state=present groups={{ item.groups }}
user: name={{ item.name }} state=present groups={{ item.groups }}
with_items:
- { name: 'testuser1', groups: 'wheel' }
- { name: 'testuser2', groups: 'root' }
...
...
@@ -603,7 +603,7 @@ Negative numbers are not supported. This works as follows::
- group: name=odds state=present
# create some test users
-
remote_
user: name={{ item }} state=present groups=evens
- user: name={{ item }} state=present groups=evens
with_sequence: start=0 end=32 format=testuser%02x
# create a series of directories with even numbers for some reason
...
...
@@ -649,7 +649,7 @@ This length can be changed by passing an extra parameter::
(...)
# create a user with a given password
-
remote_
user: name=guestuser
- user: name=guestuser
state=present
uid=5000
password={{ item }}
...
...
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