Toshio Kuratomi
f0431eaea9
Make ansible_python_interpreter work with synchronize
...
Fixes #11836
2015-08-03 13:32:24 -07:00
Brian Coca
f16b745f17
now properly uses default port if defined
2015-07-31 12:01:58 -04:00
Abhijit Menon-Sen
845784b572
Remove outdated FIXMEs; all use combine_vars already
2015-07-30 23:47:41 +05:30
Brian Coca
77fc3ce759
removed unused import
2015-07-28 08:28:52 -04:00
James Cammarata
49a6601856
Further cleanup of internal use of ansible_ssh_host
2015-07-27 10:42:39 -04:00
James Cammarata
a1a8997e89
Merge pull request #11663 from whereismyjetpack/fix_ansible_ssh_host
...
only set ansible_ssh_host if not already set
2015-07-26 23:46:21 -04:00
James Cammarata
65ae9780fa
Merge pull request #11079 from amegianeg/fix_broad_except_in_inventory
...
Avoid too broad except in Inventory
2015-07-23 13:36:02 -04:00
Dann Bohn
3e79bfa2d6
only set ansible_ssh_host if not already set
2015-07-20 15:43:55 -04:00
Gerard Lynch
d23ab261e1
fixes 11607, allows ansible_ssh_port to be overridden from group or host_vars
2015-07-16 23:00:17 +01:00
James Cammarata
4e94bb64d8
Fix group/host var loading relative to playbook basedir
2015-07-14 09:26:24 -04:00
James Cammarata
a9712bb0fb
Fixing some delegate_to bugs
...
* Moving connection creation until after the task is post_validated,
to make sure all fields are properly templated (#11230 )
* Fixing problems related to the connection method and remote address
lookup on the delegated-to host
Fixes #11230
2015-07-09 08:25:08 -04:00
James Cammarata
ff251a0dcc
Catch runtime errors due to recursion when calculating group depth
...
Fixes #7708
2015-06-22 02:06:07 -04:00
Benno Joy
f17bdc4d61
Set the ansible_ssh_port variable instead of saving it internally for Host
...
Fixes #11330
2015-06-22 00:38:41 -04:00
James Cammarata
87ca475704
Exclude the all/ungrouped groups from pattern matching results
...
Fixes #5375
2015-06-17 16:25:58 -04:00
James Cammarata
90445ee67d
Add ::1 where we see 127.0.0.1, for better ipv6 support
...
Fixes #5764
2015-06-17 16:03:19 -04:00
Marc Abramowitz
a385744426
Add inventory file to "Unable to find" error msg
...
E.g.:
$ ansible gabriel -m ping -i ssh_config.py
ERROR! Unable to find an inventory file (ssh_config.py), specify one with -i ?
2015-06-17 11:00:13 -07:00
James Cammarata
30c1a2d861
Have group/host var file loading check for YAML extensions too
...
Fixes #11132
2015-06-16 11:55:56 -04:00
Toshio Kuratomi
f9b56a5d7c
Fix raising AnsibleError
2015-06-05 11:41:23 -07:00
Toshio Kuratomi
96836412aa
Make error messages tell which inventory script the error came from
2015-06-03 11:51:33 -07:00
Toshio Kuratomi
1c8527044b
Fix error handling when pasing output from dynamic inventory
2015-06-03 11:29:20 -07:00
James Cammarata
620fad9f8d
Fixing an oops in inventory/__init__.py where the slots are incorrect
2015-06-01 20:02:15 -05:00
James Cammarata
fe41f109a9
Merge branch 'v2_final' into devel_switch_v2
2015-06-01 16:42:59 -05:00
James Cammarata
4bc7703db3
Fixing some small bugs related to integration tests (v2)
2015-06-01 16:42:10 -05:00
James Cammarata
2bad888f28
Merge branch 'v2_final' into devel_switch_v2
...
Conflicts:
lib/ansible/inventory/__init__.py
lib/ansible/modules/core
lib/ansible/utils/__init__.py
lib/ansible/utils/module_docs.py
2015-05-28 15:26:03 -05:00
alberto
37ae5aab31
Capture only IOError when reading shebang from inventory file, to avoid ignoring other possible exceptions like timeouts from a task
2015-05-28 12:19:32 +02:00
Brian Coca
0913b8263c
made special treatment of certain filesystem for selinux configurable
2015-05-15 13:52:27 -04:00
Brian Coca
e2de336a23
made special treatment of certain filesystem for selinux configurable
2015-05-15 13:19:15 -04:00
James Cammarata
ce3ef7f4c1
Making the switch to v2
2015-05-03 21:47:26 -05:00
Brian Coca
c3d34a5386
Merge pull request #8936 from srvg/inventoryscript_onlychildren
...
Allow InventoryScript JSON with childgroups only
2015-03-05 17:11:04 -05:00
Toshio Kuratomi
084fbbdea9
Reverse the conditional so there's one less return from this function
2015-02-26 22:50:11 -08:00
Alvaro Lopez Ortega
2e929cf0ce
Fixes bug #10281 - Trailing zeros were truncated from strings
2015-02-21 19:54:38 +01:00
Alvaro Lopez Ortega
a14248ffe1
Fixes bug #10281 - Trailing zeros were truncated from strings
2015-02-21 16:40:50 +01:00
Brian Coca
751701c6f2
Merge pull request #9672 from quinot/topic/lineno-in-inventory-err
...
Report location (filename and line number) for inventory syntax errors
2015-01-29 12:36:30 -05:00
Toshio Kuratomi
a63e4c595f
Another place that needs to be json_dict_bytes_to_unicode
2015-01-26 22:04:51 -08:00
Toshio Kuratomi
0f6b87d33e
Revert "Fix import statements" -- those impotrt statements were right
...
before... something else is fishy
This reverts commit 8ab536fbf2
.
2015-01-26 22:01:52 -08:00
Toshio Kuratomi
8ab536fbf2
Fix import statements
2015-01-26 21:49:09 -08:00
Toshio Kuratomi
915d232d5f
jinja2 cannot handle byte strs with non-ascii. So we need to transform potential byte str into unicode type. This fix is for dynamic inventory.
...
Fixes #10007
2015-01-26 20:39:09 -08:00
Brian Coca
2ef5d6be1e
Merge pull request #9702 from bcoca/better_errors_on_delegate
...
better exception handling with delegated hosts
2015-01-19 15:25:01 -05:00
Brian Coca
6b3d0f4788
now captures returncode errors on inventory scripts
2015-01-15 13:38:25 -05:00
Brian Coca
61a30e5f49
better exception handling with delegated hosts
2014-12-03 07:26:42 -05:00
Thomas Quinot
23d959db71
Report location (filename and line number) for inventory syntax errors
...
When AnsibleError is raised for a syntax error in an inventory file,
report filename and line number to help pinpointing the error.
2014-11-30 10:41:09 +01:00
James Cammarata
d19fe8d95d
Fetch vars for host directly when calculating the delegated user
...
This fixes the case in which the delegated to host may not be in the
specified hosts list, in which cases facts/vars for the host were
not available in the injected hostvars.
This also fixes the inventory variable fetching function, so that an
unknown host raises a proper error as opposed to a NoneType exception.
Fixes #8224
2014-10-10 01:18:18 -05:00
Toshio Kuratomi
a10d10f647
Workaround more python-2.6 shlex not being able to handle unicode strings
2014-10-08 14:30:36 -04:00
Toshio Kuratomi
cef2a8795f
Make dynamic inventory return byte str, not unicode
2014-10-02 20:27:06 -04:00
Michael DeHaan
26cdddaebf
Tracebacks are now catchable with ignore_errors and have streamlined output. Also removes 'baby-JSON' for bash modules.
2014-09-11 12:27:21 -04:00
Serge van Ginderachter
69740b86e8
Allow InventoryScript JSON with childgroups only
...
and without hosts and vars
Without this patch, the simplified syntax is triggered when a group
is defined like this:
"platforms": {
"children": [
"cloudstack"
]
}
Which results in a group 'platforms' with 1 host 'platforms'.
modified: lib/ansible/inventory/script.py
2014-09-09 11:37:54 +02:00
Serge van Ginderachter
3a228b9d55
InventoryScript: better syntax checking for json stream
2014-08-21 18:06:07 +02:00
Serge van Ginderachter
a1f09bd89f
Merge variables for hosts instead of updating in get_variables()
2014-08-20 01:54:46 -05:00
Serge van Ginderachter
0ab721d51e
better logic for all-group variables for implicit localhost
2014-08-19 16:41:51 +02:00
Serge van Ginderachter
a2cfe8770b
Inventory: fix logic mistake in loading/retrieving variables for groups
2014-08-19 16:34:26 +02:00