summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md7
-rwxr-xr-xlibrary/file15
-rwxr-xr-xlibrary/git2
-rwxr-xr-xlibrary/mysql_db2
-rwxr-xr-xlibrary/mysql_user2
-rwxr-xr-xlibrary/postgresql_db2
-rwxr-xr-xlibrary/postgresql_user2
7 files changed, 15 insertions, 17 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 198fc0a1db..5b400c2723 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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:
diff --git a/library/file b/library/file
index 1a50668989..e9089c569d 100755
--- a/library/file
+++ b/library/file
@@ -31,7 +31,7 @@ def add_path_info(kwargs):
path = kwargs['path']
if os.path.exists(path):
(user, group) = user_and_group(path)
- kwargs['user'] = user
+ kwargs['owner'] = 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 = AnsibleFileModule(
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()
diff --git a/library/git b/library/git
index a8806c704c..61abfc376b 100755
--- a/library/git
+++ b/library/git
@@ -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')
)
diff --git a/library/mysql_db b/library/mysql_db
index 47cf0bee31..157c050013 100755
--- a/library/mysql_db
+++ b/library/mysql_db
@@ -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"]),
diff --git a/library/mysql_user b/library/mysql_user
index 38b44c4490..b09b1fbd19 100755
--- a/library/mysql_user
+++ b/library/mysql_user
@@ -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"]),
diff --git a/library/postgresql_db b/library/postgresql_db
index baa1fb568b..9c5f3b8a65 100755
--- a/library/postgresql_db
+++ b/library/postgresql_db
@@ -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=""),
diff --git a/library/postgresql_user b/library/postgresql_user
index 95e72de0c8..a097051df3 100755
--- a/library/postgresql_user
+++ b/library/postgresql_user
@@ -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),