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
6ec0e25d
Commit
6ec0e25d
authored
Apr 14, 2014
by
James Tanner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addresses #6908 Add a mode parameter to apt_repository
parent
28cb4756
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletions
+11
-1
library/packaging/apt_repository
+11
-1
No files found.
library/packaging/apt_repository
View file @
6ec0e25d
...
@@ -43,6 +43,12 @@ options:
...
@@ -43,6 +43,12 @@ options:
default: "present"
default: "present"
description:
description:
- A source string state.
- A source string state.
mode:
required: false
default: 0644
description:
- The octal mode for newly created files in sources.list.d
version_added: "1.6"
update_cache:
update_cache:
description:
description:
- Run the equivalent of C(apt-get update) when a change occurs. Cache updates are run after making changes.
- Run the equivalent of C(apt-get update) when a change occurs. Cache updates are run after making changes.
...
@@ -217,7 +223,10 @@ class SourcesList(object):
...
@@ -217,7 +223,10 @@ class SourcesList(object):
if
sources
:
if
sources
:
d
,
fn
=
os
.
path
.
split
(
filename
)
d
,
fn
=
os
.
path
.
split
(
filename
)
fd
,
tmp_path
=
tempfile
.
mkstemp
(
prefix
=
".
%
s-"
%
fn
,
dir
=
d
)
fd
,
tmp_path
=
tempfile
.
mkstemp
(
prefix
=
".
%
s-"
%
fn
,
dir
=
d
)
os
.
chmod
(
os
.
path
.
join
(
fd
,
tmp_path
),
0644
)
# allow the user to override the default mode
this_mode
=
module
.
params
[
'mode'
]
module
.
set_mode_if_different
(
tmp_path
,
this_mode
,
False
)
f
=
os
.
fdopen
(
fd
,
'w'
)
f
=
os
.
fdopen
(
fd
,
'w'
)
for
n
,
valid
,
enabled
,
source
,
comment
in
sources
:
for
n
,
valid
,
enabled
,
source
,
comment
in
sources
:
...
@@ -356,6 +365,7 @@ def main():
...
@@ -356,6 +365,7 @@ def main():
argument_spec
=
dict
(
argument_spec
=
dict
(
repo
=
dict
(
required
=
True
),
repo
=
dict
(
required
=
True
),
state
=
dict
(
choices
=
[
'present'
,
'absent'
],
default
=
'present'
),
state
=
dict
(
choices
=
[
'present'
,
'absent'
],
default
=
'present'
),
mode
=
dict
(
required
=
False
,
default
=
0644
),
update_cache
=
dict
(
aliases
=
[
'update-cache'
],
type
=
'bool'
,
default
=
'yes'
),
update_cache
=
dict
(
aliases
=
[
'update-cache'
],
type
=
'bool'
,
default
=
'yes'
),
# this should not be needed, but exists as a failsafe
# this should not be needed, but exists as a failsafe
install_python_apt
=
dict
(
required
=
False
,
default
=
"yes"
,
type
=
'bool'
),
install_python_apt
=
dict
(
required
=
False
,
default
=
"yes"
,
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