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
c679491e
Commit
c679491e
authored
Oct 09, 2013
by
James Tanner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#4408 s3: add force alias for overwrite and set True by default
parent
c55107fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
library/cloud/s3
+8
-4
No files found.
library/cloud/s3
View file @
c679491e
...
@@ -52,7 +52,7 @@ options:
...
@@ -52,7 +52,7 @@ options:
description:
description:
- Force overwrite either locally on the filesystem or remotely with the object/key. Used with PUT and GET operations.
- Force overwrite either locally on the filesystem or remotely with the object/key. Used with PUT and GET operations.
required: false
required: false
default:
fals
e
default:
tru
e
version_added: "1.2"
version_added: "1.2"
mode:
mode:
description:
description:
...
@@ -93,9 +93,13 @@ EXAMPLES = '''
...
@@ -93,9 +93,13 @@ EXAMPLES = '''
# Simple GET operation
# Simple GET operation
- s3: bucket=mybucket object=/my/desired/key.txt dest=/usr/local/myfile.txt mode=get
- s3: bucket=mybucket object=/my/desired/key.txt dest=/usr/local/myfile.txt mode=get
# GET/download and overwrite local file (trust remote)
# GET/download and overwrite local file (trust remote)
- s3: bucket=mybucket object=/my/desired/key.txt dest=/usr/local/myfile.txt mode=get overwrite=true
- s3: bucket=mybucket object=/my/desired/key.txt dest=/usr/local/myfile.txt mode=get
# GET/download and do not overwrite local file (trust remote)
- s3: bucket=mybucket object=/my/desired/key.txt dest=/usr/local/myfile.txt mode=get force=false
# PUT/upload and overwrite remote file (trust local)
# PUT/upload and overwrite remote file (trust local)
- s3: bucket=mybucket object=/my/desired/key.txt src=/usr/local/myfile.txt mode=put overwrite=true
- s3: bucket=mybucket object=/my/desired/key.txt src=/usr/local/myfile.txt mode=put
# PUT/upload and do not overwrite remote file (trust local)
- s3: bucket=mybucket object=/my/desired/key.txt src=/usr/local/myfile.txt mode=put force=false
# Download an object as a string to use else where in your playbook
# Download an object as a string to use else where in your playbook
- s3: bucket=mybucket object=/my/desired/key.txt src=/usr/local/myfile.txt mode=getstr
- s3: bucket=mybucket object=/my/desired/key.txt src=/usr/local/myfile.txt mode=getstr
# Create an empty bucket
# Create an empty bucket
...
@@ -253,7 +257,7 @@ def main():
...
@@ -253,7 +257,7 @@ def main():
s3_url
=
dict
(
aliases
=
[
'S3_URL'
]),
s3_url
=
dict
(
aliases
=
[
'S3_URL'
]),
aws_secret_key
=
dict
(
aliases
=
[
'ec2_secret_key'
,
'secret_key'
],
no_log
=
True
,
required
=
False
),
aws_secret_key
=
dict
(
aliases
=
[
'ec2_secret_key'
,
'secret_key'
],
no_log
=
True
,
required
=
False
),
aws_access_key
=
dict
(
aliases
=
[
'ec2_access_key'
,
'access_key'
],
required
=
False
),
aws_access_key
=
dict
(
aliases
=
[
'ec2_access_key'
,
'access_key'
],
required
=
False
),
overwrite
=
dict
(
default
=
Fals
e
,
type
=
'bool'
),
overwrite
=
dict
(
aliases
=
[
'force'
],
default
=
Tru
e
,
type
=
'bool'
),
),
),
)
)
...
...
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