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
0a3ebdb6
Commit
0a3ebdb6
authored
Aug 01, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Module consistency and make daisy chaining work with invalid arguments detection.
parent
db9955d3
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
17 deletions
+15
-17
CHANGELOG.md
+1
-6
library/file
+9
-6
library/git
+1
-1
library/mysql_db
+1
-1
library/mysql_user
+1
-1
library/postgresql_db
+1
-1
library/postgresql_user
+1
-1
No files found.
CHANGELOG.md
View file @
0a3ebdb6
...
...
@@ -20,16 +20,11 @@ playbooks:
inventory:
*
inventory file can use a line of the form base
[
beg:end
]
tail to define a
set of hosts, where
[
beg:end
]
defines a numerical range. 'beg' can be a
a string padded with zero(s) to the left. If so provided, it acts as
a formatting hint during hostname expansion. The hint must be confirmed
by having an 'end' that has the same length as 'beg'
*
groups variable available as a hash to return the hosts in each group name
*
in YAML inventory, hosts can list their groups in inverted order now also (see tests/yaml_hosts)
*
YAML inventory is deprecated and will be removed in 0.7
*
ec2 inventory script
*
support ranges of hosts in the host file
*
support ranges of hosts in the host file
, like www
[
001-100
]
.example.com (supports leading zeros and also not)
modules:
...
...
library/file
View file @
0a3ebdb6
...
...
@@ -31,7 +31,7 @@ def add_path_info(kwargs):
path
=
kwargs
[
'path'
]
if
os
.
path
.
exists
(
path
):
(
user
,
group
)
=
user_and_group
(
path
)
kwargs
[
'
us
er'
]
=
user
kwargs
[
'
own
er'
]
=
user
kwargs
[
'group'
]
=
group
st
=
os
.
stat
(
path
)
kwargs
[
'mode'
]
=
oct
(
stat
.
S_IMODE
(
st
[
stat
.
ST_MODE
]))
...
...
@@ -209,13 +209,10 @@ def set_mode_if_different(path, mode, changed):
def
rmtree_error
(
func
,
path
,
exc_info
):
module_fail_json
(
path
=
path
,
msg
=
'failed to remove directory'
)
# ===========================================
# go...
def
main
():
global
module
module
=
AnsibleModule
(
module
=
Ansible
File
Module
(
argument_spec
=
dict
(
state
=
dict
(
choices
=
[
'file'
,
'directory'
,
'link'
,
'absent'
],
default
=
'file'
),
path
=
dict
(
aliases
=
[
'dest'
,
'name'
],
required
=
True
),
...
...
@@ -351,6 +348,12 @@ def main():
# this is magic, see lib/ansible/module_common.py
#<<INCLUDE_ANSIBLE_MODULE_COMMON>>
main
()
class
AnsibleFileModule
(
AnsibleModule
):
def
_check_invalid_arguments
(
self
):
# needed to support daisy chaining
pass
main
()
library/git
View file @
0a3ebdb6
...
...
@@ -142,7 +142,7 @@ def main():
module
=
AnsibleModule
(
argument_spec
=
dict
(
dest
=
dict
(
required
=
True
),
repo
=
dict
(
required
=
True
),
repo
=
dict
(
required
=
True
,
aliases
=
[
'name'
]
),
version
=
dict
(
default
=
'HEAD'
),
remote
=
dict
(
default
=
'origin'
)
)
...
...
library/mysql_db
View file @
0a3ebdb6
...
...
@@ -70,7 +70,7 @@ def main():
login_user
=
dict
(
default
=
None
),
login_password
=
dict
(
default
=
None
),
login_host
=
dict
(
default
=
"localhost"
),
db
=
dict
(
required
=
True
),
db
=
dict
(
required
=
True
,
aliases
=
[
'name'
]
),
encoding
=
dict
(
default
=
""
),
collation
=
dict
(
default
=
""
),
state
=
dict
(
default
=
"present"
,
choices
=
[
"absent"
,
"present"
]),
...
...
library/mysql_user
View file @
0a3ebdb6
...
...
@@ -164,7 +164,7 @@ def main():
login_user
=
dict
(
default
=
None
),
login_password
=
dict
(
default
=
None
),
login_host
=
dict
(
default
=
"localhost"
),
user
=
dict
(
required
=
True
),
user
=
dict
(
required
=
True
,
aliases
=
[
'name'
]
),
password
=
dict
(
default
=
None
),
host
=
dict
(
default
=
"localhost"
),
state
=
dict
(
default
=
"present"
,
choices
=
[
"absent"
,
"present"
]),
...
...
library/postgresql_db
View file @
0a3ebdb6
...
...
@@ -57,7 +57,7 @@ def main():
login_user
=
dict
(
default
=
"postgres"
),
login_password
=
dict
(
default
=
""
),
login_host
=
dict
(
default
=
""
),
db
=
dict
(
required
=
True
),
db
=
dict
(
required
=
True
,
aliases
=
[
'name'
]
),
owner
=
dict
(
default
=
""
),
template
=
dict
(
default
=
""
),
encoding
=
dict
(
default
=
""
),
...
...
library/postgresql_user
View file @
0a3ebdb6
...
...
@@ -106,7 +106,7 @@ def main():
login_user
=
dict
(
default
=
"postgres"
),
login_password
=
dict
(
default
=
""
),
login_host
=
dict
(
default
=
""
),
user
=
dict
(
required
=
True
),
user
=
dict
(
required
=
True
,
aliases
=
[
'name'
]
),
password
=
dict
(
default
=
None
),
state
=
dict
(
default
=
"present"
,
choices
=
[
"absent"
,
"present"
]),
db
=
dict
(
required
=
True
),
...
...
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