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
b50d1ff6
Commit
b50d1ff6
authored
Aug 08, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'discordianfish-docker-add-net-parameter' into devel
parents
27de1fbb
4a08aac2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletions
+18
-1
library/cloud/docker
+18
-1
No files found.
library/cloud/docker
View file @
b50d1ff6
...
...
@@ -183,6 +183,13 @@ options:
default: false
aliases: []
version_added: "1.6"
net:
description:
- Set Network mode for the container (bridge, none, container:<name|id>, host). Requires docker >= 0.11.
required: false
default: false
aliases: []
version_added: "1.8"
author: Cove Schneider, Joshua Conner, Pavel Antonov
requirements: [ "docker-py >= 0.3.0", "docker >= 0.10.0" ]
'''
...
...
@@ -293,6 +300,14 @@ Create containers with options specified as strings and lists as comma-separated
sudo: yes
tasks:
docker: image=namespace/image_name links=postgresql:db,redis:redis
Create a container with no networking:
- hosts: web
sudo: yes
tasks:
docker: image=namespace/image_name net=none
'''
HAS_DOCKER_PY
=
True
...
...
@@ -597,6 +612,7 @@ class DockerManager:
'publish_all_ports'
:
self
.
module
.
params
.
get
(
'publish_all_ports'
),
'privileged'
:
self
.
module
.
params
.
get
(
'privileged'
),
'links'
:
self
.
links
,
'network_mode'
:
self
.
module
.
params
.
get
(
'net'
),
}
if
docker
.
utils
.
compare_version
(
'1.10'
,
self
.
client
.
version
()[
'ApiVersion'
])
>=
0
and
hasattr
(
docker
,
'__version__'
)
and
docker
.
__version__
>
'0.3.0'
:
params
[
'dns'
]
=
self
.
module
.
params
.
get
(
'dns'
)
...
...
@@ -682,7 +698,8 @@ def main():
stdin_open
=
dict
(
default
=
False
,
type
=
'bool'
),
tty
=
dict
(
default
=
False
,
type
=
'bool'
),
lxc_conf
=
dict
(
default
=
None
,
type
=
'list'
),
name
=
dict
(
default
=
None
)
name
=
dict
(
default
=
None
),
net
=
dict
(
default
=
None
)
)
)
...
...
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