Iordan Iordanov
a1854bb762
Add support for checking host against global known host files.
2014-02-24 16:05:03 -05:00
James Cammarata
3b2d409906
Fixing several bugs in assemble and updating tests
...
Bugfixes:
* the remote_src param was not being converted to a boolean correctly,
resulting in it never being used by the module as the default behavior
was remote_src=True (issue #5581 )
* the remote_src param was not listed in the generic file params, leading
to a failure when the above bug regarding remote_src was fixed
* the delimiter should always end with a newline to ensure that the file
fragments do not run together on one line
Fixes #5581
2014-02-24 14:27:23 -06:00
jctanner
93c746db9c
Merge pull request #5651 from nikut/sshfix
...
allow ansible_ssh_private_key_file to be templated (thanks to benno)
2014-02-24 14:26:48 -05:00
Richard C Isaacson
8be8dbc9ed
Formatting cleanup.
2014-02-24 11:11:47 -06:00
Richard C Isaacson
aaf0a182e1
Merge remote-tracking branch 'jeromew/ansible_script_creates' into issues_4986
2014-02-24 10:16:39 -06:00
James Tanner
4af1d6098b
Fixes #5939 Allow for delegate hosts that are not in inventory
2014-02-21 15:54:09 -05:00
Michael DeHaan
bc65956798
Add tests that leverage most of our custom filters. A few more to add.
2014-02-20 15:24:03 -05:00
James Cammarata
f5505425f9
Adding 'expanduser' filter to the core filters list
...
Example usage: {{ my_path | expanduser }} # my_path: "~/path/to/file"
2014-02-20 13:48:07 -05:00
James Cammarata
ef2df8157a
Fixup result dictionary when copy module calls file module
2014-02-19 18:05:59 -05:00
muffl0n
b0f00cc097
already call expanduser in action_plugin
2014-02-19 21:41:57 +01:00
muffl0n
5f0e882d01
call expanduser for src and dest
2014-02-19 21:30:53 +01:00
root
0df166e7c0
Copy tests WIP, fix bug in assert module upgrades where the wrong value was being checked.
2014-02-19 14:36:54 -05:00
James Cammarata
54117ab28f
Modified assert module to take tests as an array
2014-02-19 14:05:03 -05:00
Richard Isaacson
dc403eb21e
Merge pull request #6058 from jctanner/vault_squashed_2
...
Ansible vault: a framework for encrypting any playbook or var file.
2014-02-19 11:39:55 -05:00
James Tanner
3fc87e011b
Fix all other calls to yaml
2014-02-19 11:01:21 -05:00
James Tanner
427b8dc78d
Ansible vault: a framework for encrypting any playbook or var file.
2014-02-18 15:35:12 -05:00
Richard C Isaacson
1ac19cb981
Copy action_plugin: encode content when dict.
...
When content is processed and found to be valid JSON it is decoded into a dict. To write it out to a file we need to encode it back into a string.
Addresses GH-5914.
2014-02-18 13:23:44 -06:00
James Cammarata
f29ce80d12
Default port to 22 for paramiko when it is unset
2014-02-18 09:53:24 -06:00
jeromew
7a14cb61c4
Add creates= and removes= to the script: action
2014-02-18 12:52:09 +00:00
Niku Toivola
6cc9b16f06
allow templating of ansible_ssh_private_key_file also in the synchronize module
2014-02-18 11:32:33 +02:00
Niku Toivola
2faaff78ee
removed comment
2014-02-18 11:32:06 +02:00
Niku Toivola
68a3e8163e
allow ansible_ssh_private_key_file to be templated (thanks to benno)
2014-02-18 11:32:05 +02:00
James Cammarata
788ac51185
Sanitize sudo success_key from stdout for raw/script modules
...
Fixes #5533
Closes #5605
Closes #5606
Closes #5607
2014-02-17 12:47:47 -06:00
Michael DeHaan
c91ceddfac
Add the start of an integration test structure using Ansible playbooks, also added an assert action plugin to make writing those easier.
2014-02-13 18:28:29 -05:00
Brian Coca
31b5728618
directory detection should now work on BSDs, added AIX alternate path
2014-02-13 08:23:56 -05:00
Richard Isaacson
eb4a730933
Merge pull request #5969 from risaacson/pull_5136
...
Updates for the unarchive module and action_plugin.
2014-02-12 10:10:25 -06:00
Richard C Isaacson
598b9c6b7c
Cleanup per notes.
...
Some small changes to per notes from @mpdehann.
2014-02-12 10:01:10 -06:00
Richard C Isaacson
cb7c2b7524
Updates for the unarchive module and action_plugin.
...
There is a bit going on with the changes here. Most of the changes are cleanup of files so that they line up with the standard files.
PR #5136 was merged into the current devel and brought up to working order. A few bug fixes had to be done to get the code to test correctly. Thanks out to @pib!
Issue #5431 was not able to be confirmed as it behaved as expected with a sudo user.
Tests were added via a playbook with archive files to verify functionality.
All tests fire clean including custom playbooks across multiple linux and solaris systems.
2014-02-12 01:57:00 -06:00
Jacob Weber
35742fe008
Add regex_replace jinja2 filter
2014-02-11 22:02:53 -08:00
Richard C Isaacson
e6c9705058
Merge remote-tracking branch 'pib/unarchive_remote' into pull_5136
2014-02-11 22:55:34 -06:00
James Tanner
9ce46e5f41
Refactor the synchronize action plugin and add unit tests
2014-02-10 23:39:17 -05:00
Richard C Isaacson
786e3d2fd2
Refining the fix made in #5885 .
...
It turns out that some of the assumptions in #5885 were slightly off. The previous fix relied on a call to the module to creat a tmp_path. This is insufficent as there are few cases that we need to have the tmp directory before we make the module call. If we don't have a tmp_path before we do a recursive call or when we find a file that does not match the remote md5 hash we need to create a tmp directory. Also we are not more percise when we will need to clean up the remote tmp_path.
2014-02-08 02:25:42 -06:00
Michael DeHaan
1609dfbca4
Revert "Revert "Revert "Add the fork manager code (related to previous patch)."""
...
This reverts commit 60d3611b70
.
2014-02-07 20:38:24 -05:00
Michael DeHaan
633d685bb7
Revert "Revert "Revert "This patch makes Ansible reuse fork allocation between seperate instantations of the runner API, therefore the overhead of recreating forks"""
...
This reverts commit 73ca1a173c
.
2014-02-07 20:38:20 -05:00
Michael DeHaan
ad8c275887
Revert "While the previous work on the foon class can't be quite recycled, it's still a nice abstraction."
...
This reverts commit caab52aee2
.
2014-02-07 20:38:18 -05:00
Michael DeHaan
caab52aee2
While the previous work on the foon class can't be quite recycled, it's still a nice abstraction.
2014-02-07 19:32:19 -05:00
Michael DeHaan
73ca1a173c
Revert "Revert "This patch makes Ansible reuse fork allocation between seperate instantations of the runner API, therefore the overhead of recreating forks""
...
This reverts commit 6685b4989e
.
2014-02-07 18:14:27 -05:00
Michael DeHaan
60d3611b70
Revert "Revert "Add the fork manager code (related to previous patch).""
...
This reverts commit c53538dc77
.
2014-02-07 18:14:13 -05:00
Michael DeHaan
6685b4989e
Revert "This patch makes Ansible reuse fork allocation between seperate instantations of the runner API, therefore the overhead of recreating forks"
...
This reverts commit 85d66b9a0c
.
2014-02-07 18:10:38 -05:00
Michael DeHaan
c53538dc77
Revert "Add the fork manager code (related to previous patch)."
...
This reverts commit adb1719fe8
.
2014-02-07 18:10:29 -05:00
Michael DeHaan
adb1719fe8
Add the fork manager code (related to previous patch).
2014-02-07 16:53:35 -05:00
Michael DeHaan
85d66b9a0c
This patch makes Ansible reuse fork allocation between seperate instantations of the runner API, therefore the overhead of recreating forks
...
between tasks in a playbook is avoided. The fork pool will be regenerated when a second play comes along and needs more hosts.
2014-02-07 16:53:35 -05:00
Richard Isaacson
2d88246c9d
Merge pull request #5885 from risaacson/issue5739_4
...
Addresses #5739 and cleans up copy.py
2014-02-07 13:49:06 -06:00
Richard C Isaacson
ac0a5c8ad5
Dug into the remaining FIXME and replaced with comments to document the expected behavior.
2014-02-05 11:39:22 -06:00
Luca Berruti
75b7a1d9c7
Fix slow ssh
...
We break the read while loop after waiting "the end of the process" and
the pipes are empty, otherwise we do another select that waits all the
timeout.
2014-02-05 09:45:03 +01:00
Richard C Isaacson
a3261500dd
Addresses #5739 and cleans up copy.py
...
The copy action_plugin is not easy to read. Part of this commit is taking that file, restructuring it, and adding comments. No functionality changed in how it interacts with the world.
The fix for #5739 ends up being the assumption that there is a cleanup 'rm -rf' that happens at the end of the copy loop. This was not the fact before and we made a bunch of tmp directories that we hoped would end up being cleaned up. Now we just use the tmp directory that the runner provides and cleanup inline if it is a single file to be coppied or after the loop if it is a recursive copy.
As a part of this we did end up having to change runner to provide a flag so that we could short the inline tmp directory removal. This flag defaults to True so it will not change the behavior of other modules that are being called.
2014-02-04 12:44:10 -06:00
James Tanner
5fafc61008
Fixes 5870 Template delegate hostname earlier in the process
2014-02-04 13:31:22 -05:00
James Tanner
d355d3c698
Fixes #5818 Default to all known connection information for the delegate host
2014-02-03 16:59:30 -05:00
Timur Batyrshin
658c15930e
reword "except Error as e:" into "except Error, e:" to be compatible with Python 2.5 ( #5852 )
2014-02-03 13:00:40 -06:00
James Cammarata
2d0e9cd75d
Revert "Fix for issue 5739. The copy module does not delete directories it will only unlinks symlinks."
...
This reverts commit b20dc4f578
.
2014-02-03 12:54:52 -06:00
James Cammarata
9ff99acaff
Merge branch 'issue5739_3' of https://github.com/risaacson/ansible into risaacson-issue5739_3
2014-02-03 09:52:50 -06:00
Brian Coca
ff024b65b2
now with_items also accepts sets
...
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
2014-02-01 17:55:38 -05:00
Richard C Isaacson
b20dc4f578
Fix for issue 5739. The copy module does not delete directories it will only unlinks symlinks.
2014-01-31 17:19:44 -06:00
James Cammarata
75e3b59bbd
Adding no_log: capability for tasks
...
Fixes #4088
2014-01-31 16:58:46 -06:00
James Tanner
e6aeb191d5
Revert "Merge branch 'slow_ssh' of git://github.com/lberruti/ansible into lberruti-slow_ssh"
...
This reverts commit fe091ec00d
, reversing
changes made to aed2194b1d
.
2014-01-30 16:02:05 -05:00
James Cammarata
9574f89471
Detect remote_user change in accelerate daemon and allow a restart
...
Fixes #5812
2014-01-30 14:40:41 -06:00
jctanner
6c25ea1b91
Merge pull request #5527 from sergevanginderachter/basedirdwim
...
path_dwim: fix when basedir not set
2014-01-30 10:54:19 -08:00
Michael DeHaan
d07a3b5e9b
AnsibleWorks -> Ansible
2014-01-28 20:29:42 -05:00
Heikki Hokkanen
b6875b3b87
Fix .ssh/known_hosts path expansion.
...
In particular, do not rely on the $USER environment variable always existing.
tmux for example seems to clear it, causing lots of invalid messages:
"previous known host file not found"
This broke in commit 80fd22dc
, but instead of reverting that commit, we now
fall back to expanding just ~ when $USER is not set.
2014-01-28 15:11:44 -06:00
James Tanner
fe091ec00d
Merge branch 'slow_ssh' of git://github.com/lberruti/ansible into lberruti-slow_ssh
2014-01-28 13:06:07 -05:00
Adam Heath
aed2194b1d
self.su_user is done earlier in the code path, and is auto-vivified from
...
su_user_var. My last PR was only half merged, and when the bug fix for
the su/su_pass typo was merged, the removed line in this commit was
mistakenly reintroduced.
2014-01-28 11:04:24 -06:00
James Cammarata
88e2595a90
Fixing bug relating to su without an su_pass
2014-01-27 16:27:02 -06:00
Adam Heath
fac7c6d3fe
Allow su_user to be templated, same as sudo_user.
2014-01-27 16:27:02 -06:00
James Cammarata
3fddd78ec5
Fixing traceback caused by incorrect argument passing to json.dumps
...
Fixes #5756
2014-01-27 11:28:07 -06:00
jeromew
ef69d23715
Bug: chmod should be called only if the tmp dir was created in the first place
2014-01-22 14:04:39 +00:00
Thomas Omans
9343db69b4
Fixing whitespace
2014-01-21 12:44:36 -08:00
Thomas Omans
ce0b5d16b3
Allow templates in ansible_sudo_pass inventory var
...
Template ansible_sudo_pass the same way we template ansible_ssh_pass.
2014-01-21 12:37:04 -08:00
James Tanner
61d283e2ad
Fix merge conflicts from #5519
2014-01-21 13:35:06 -05:00
Paul Durivage
f72f5a20df
Revert "Revert "Merge pull request #5325 from angstwad/add-su-support""
...
This reverts commit c17d0e0357
.
Conflicts:
lib/ansible/runner/connection_plugins/paramiko_ssh.py
2014-01-20 19:19:03 -06:00
Paul Durivage
4c84ba74b0
Resolve su bug in paramiko libs
2014-01-20 19:16:37 -06:00
Jesse Keating
6013f0738e
Store the list of hosts to run on in runner object
...
This reduces the number of times inventory.list_hosts is called, which
can be costly. When coming from a playbook that data is already known.
2014-01-20 16:22:28 -08:00
James Tanner
c17d0e0357
Revert "Merge pull request #5325 from angstwad/add-su-support"
...
This reverts commit 6f4bfa2cff
, reversing
changes made to c91ba3a7c7
.
2014-01-20 16:10:11 -05:00
Paul Durivage
8cf071f697
Hostvars support for su
2014-01-20 12:01:28 -06:00
Paul Durivage
d21281ff43
Resolve rebase conflicts
2014-01-20 11:46:05 -06:00
Paul Durivage
ab6ee1a282
Enable su support in paramkio; disable su support in fireball, local, accelerate, chroot, jail, funcd connection plugins
2014-01-20 11:25:10 -06:00
Paul Durivage
4088243deb
Proposing fix for Issue #4324 ; adding support for su in connection plugins ssh, ssh_alt
...
Fixes for ssh_alt support, adding in references to in_data where appropriate
2014-01-20 11:25:10 -06:00
Michael Scherer
5c5c8fd7ce
Make synchronize module work better with local transport, fix #5668
2014-01-17 17:32:36 +01:00
James Cammarata
02ce5af6df
Added ANSIBLE_SSH_PIPELINING option to enable/disable pipelining support
...
Pipelining will be disabled by default, since it requires users remove
the 'requiretty' option from the servers sudoers configuration.
2014-01-16 12:41:33 -06:00
James Cammarata
233aae5861
Reverting paramiko_ssh/alt changes from yesterday
2014-01-16 09:45:28 -06:00
James Cammarata
36e6709771
Don't use pipelining when ANSIBLE_KEEP_REMOTE_FILES is enabled
2014-01-15 16:03:18 -06:00
James Cammarata
df13b19fe1
Moving {ssh,paramiko}_alt connection types to be the defaults
...
The previous implementations will be kept for now as _old
2014-01-15 16:03:18 -06:00
James Cammarata
c27db84e41
Adding paramiko_alt - pipelining support for paramiko connections
2014-01-15 16:03:17 -06:00
jctanner
91c5c9da08
Merge pull request #5465 from deonbredenhann/false_mandatory_variable
...
Treat a False mandatory variable as defined.
2014-01-14 14:15:52 -08:00
jctanner
671b0454c6
Merge pull request #4987 from jpmens/lookup-csvfile
...
New lookup plugin csvreader
2014-01-14 07:17:52 -08:00
James Tanner
09e0d052ca
Ensure sys.stdout has an istty method
2014-01-10 17:42:43 -05:00
James Tanner
d7c8cf6ca7
Fixes #4958 Truncate printed stdout if it contains non-printable characters
2014-01-10 15:08:45 -05:00
Luca Berruti
ae543eecab
Simplified p.poll handling
2014-01-10 11:34:21 +01:00
James Tanner
c408bcea31
Update sshpass hostkey error message
2014-01-08 17:25:50 -05:00
James Tanner
0b64408f5a
Fixes #5531 Give the user a better error message when sshpass does not know the remote hostkey
2014-01-08 16:50:40 -05:00
jeromew
69febcefde
remove useless create/delete remote tmp dir roundtrip in copy module
2014-01-08 15:22:12 +00:00
Serge van Ginderachter
836fb4143c
path_dwim: fix when basedir not set
2014-01-08 02:21:10 +01:00
jeromew
c9b01febb3
Make sure 'tmp' is in the remote tmp dirname to ensure correct cleanup
2014-01-07 20:56:12 +00:00
smoothify
93a55e8dff
Don't override sudo if transport is set to local.
...
https://github.com/ansible/ansible/pull/5251
2014-01-04 23:32:25 +00:00
Michael DeHaan
1c632af2c9
Merge pull request #5468 from jeromew/ansible_ssh_alt
...
fix issue #5372 on ssh_alt: accept -K option for a user with NOPASSWD
2014-01-04 10:55:58 -08:00
Michael DeHaan
10350d1639
Update various copyrights. Not complete, but sufficient.
2014-01-04 13:32:04 -05:00
Michael DeHaan
8e5b7d3095
Remove code underlying when_* and only_if, which are deprecated features slated for removal in the 1.5 release.
2014-01-03 19:13:21 -05:00
James Tanner
fc473b3246
Fixes #5146 Handle missing stdin when running under celery with rabbitmq or redis
2014-01-03 09:46:16 -05:00
James Tanner
cb2214d6f8
Fixes #4935 Synchronize module: set destination to an fqdn if connection is not local, and abide by ansible_remote_user
2014-01-02 14:58:12 -05:00
jctanner
99560e3902
Merge pull request #5047 from sergevanginderachter/synch_template_ansiblesshhost
...
synchronize: allow ansible_ssh_host to be templated
2014-01-02 09:05:14 -08:00
jeromew
b2cd4a62de
fix issue #5372 on ssh_alt: accept -K option even for a user with NOPASSWD
2013-12-31 14:29:46 -05:00
Deon Bredenhann
c85aac8b17
Treat a False mandatory variable as defined.
2013-12-31 13:41:40 +02:00
Deon Bredenhann
4f1f13b100
Remove trailing space
2013-12-31 13:40:21 +02:00
Levi Gross
dc6a26123b
Fixed syntax error and removed unused imports
2013-12-25 11:04:47 -05:00
Michael DeHaan
643690ffec
Remove depedency of lookup plugin on setting in ansible.cfg
2013-12-21 08:49:08 -05:00
Stephen Fromm
833e1f6e2a
Make sure action plugin copy cleans up tmp dir
...
The copy action plugin creates its own tmp dir for each file that it
copies to the target machine. However, it does not clean up the
original tmp path it was given when run() is called. This cleans up the
tmp path before it begins looping on source files.
2013-12-20 14:58:34 -08:00
dparalen
6bf5d664dc
allow per-host sudo operation
2013-12-20 15:49:25 +01:00
jeromew
e4a3f49fa2
ssh_alt - only trigger 'fatal' when returncode == 255 (interpreted as 'could no connect')
2013-12-17 11:42:00 -05:00
jeromew
5c965a75f0
ssh_alt.py / decrease # of ssh roundtrips
2013-12-13 14:23:40 -05:00
Jesse Keating
8cef210aea
Make sure ssh pipes are empty before moving on
...
Resolves issue #5082
Code as it was would hit a scenario where one of the FDs was not ready for
reading the first time through -- but p.poll() would show the process as
complete. This would cause ansible to continue on, while leaving some content
left in a pipe.
The other scenario -- the one that causes the unclosed quote, is if we go
through select.select() and we do get stdout in the ready for reading -- we
read from it (9000 bytes), but that's not all that is there. Again we'd get to
the p.poll() check and it would be indeed not none, but we would have left some
of stdout on the FD and thus the json blob would be malformed.
Tested with and without full ssh debugging.
Tested with and without ControlPersist
Tested with and without ControlPersist sockets already created
2013-12-11 21:32:37 -08:00
Michael DeHaan
929f8a5c93
Had to revert commits due to async.
2013-12-10 19:24:08 -05:00
Michael DeHaan
74e4ccb59b
Revert "ssh_alt.py / decrease # of ssh roundtrips"
...
This reverts commit 7f8863f96d
.
2013-12-10 19:23:52 -05:00
jeromew
7f8863f96d
ssh_alt.py / decrease # of ssh roundtrips
2013-12-10 06:00:21 -05:00
jeromew
db182ba498
copy ssh.py to ssh_alt.py
2013-12-09 14:11:29 -05:00
Steve Smith
5b81f88c8f
Cast the retrieved retries
var to an int before incrementing as it may be in string form.
...
For example, the following method of calculating the value will result in a type error:
appstatus_waitfor: 4 # Minutes
appstatus_delay: 5 # seconds
appstatus_retries: "{{ mins * 60 / delay }}"
2013-12-07 10:35:14 +01:00
jctanner
7aa35d64c2
Merge pull request #5091 from EspadaV8/5089_assemble_fix
...
#5089 hack-fix assemble module
2013-12-04 10:13:16 -08:00
Paul Bonser
58acd8cce1
If there is no tmp_src, don't modify the args
2013-12-03 18:59:50 -06:00
Paul Bonser
4afcd50487
properly convert arg into boolean
2013-12-03 18:46:37 -06:00
Matt Martz
5f0f3566a6
Skipped only has 2 p's not 3
2013-12-03 15:42:34 -06:00
James Tanner
d227614529
Fixes #5109 synchronize module ssh port
...
Added a parameter for dest_port and also check ansible_ssh_port inventory variable.
2013-12-03 14:48:20 -05:00
Paul Bonser
5626efba7e
Optionally unarchive a file already on the remote machine
2013-12-02 19:51:10 -06:00
Andrew Smith
eed32ea70c
dest_contents isn’t always defined, so don’t pass it around
...
I think this is also a bit of a hack since it should probably be set
before being used, I’m just not sure what it should be set to.
2013-11-28 10:59:51 +10:00
Andrew Smith
e2d03173d2
The file module doesn’t have it’s module_args reset
...
I believe that this should be reset in the same way that the copy module
does
2013-11-28 10:58:14 +10:00
Andrew Smith
7b01c83159
Passing in complex_args throws ‘unsupported parameter for module’ errors
...
When using assemble only params (e.g. remote_src) the copy (and I’m
guessing file) modules throw an error that the param isn’t supported.
Simply removing the complex_args param fixes it for me, but I’m not sure
that’s the correct thing to do
2013-11-28 10:55:35 +10:00
Andrew Smith
da44a7f0cb
I think that resultant is meant to be the contents of the combined file
...
It is used for the transfer and as a diff param but isn’t actually
defined anywhere before it’s used. This seemed like the least bad place
to set it.
2013-11-28 10:53:00 +10:00
Andrew Smith
4503413baa
ReturnData is used throughout but not actually imported
2013-11-28 10:51:04 +10:00
Andrew Smith
7d007cac16
Correct the invocation of ‘_assemble_from_fragments’
2013-11-28 09:44:14 +10:00
jctanner
920bc6e75b
Merge pull request #5086 from j2sol/fix-accelerate_inventory
...
Avoid a traceback when using accelerate
2013-11-27 14:46:12 -08:00
James Tanner
b6879ca2bd
Fixes #5030 compare connection user and sudo user and disable sudo if identical
2013-11-27 17:01:53 -05:00
Jesse Keating
5522d489e3
Avoid a traceback when using accelerate
...
This bit of code is attempting to access accelerate_inventory_host,
which may not have been set/created. This will cause a traceback.
Instead use getattr with a fallback to False.
2013-11-27 13:58:11 -08:00
James Tanner
12ed39ef7b
Fixes #5056 Append new hosts to the groups cache
2013-11-27 13:04:31 -05:00
Brian Coca
65885feeeb
fixed typo for assemble function
2013-11-26 08:30:28 -05:00
James Tanner
b8146e3bc7
Fixes #4979 Check for the correct context when inside the inventory_hostnames plugin
2013-11-25 10:57:10 -05:00
James Tanner
903c4cae7b
Fixes #5031 Template the delay value and cast to float for loops
2013-11-25 10:13:55 -05:00
Serge van Ginderachter
2f9470ec1d
synchronize: allow ansible_ssh_host to be templated
...
This is already enabled in the runner also.
2013-11-25 15:33:04 +01:00
James Tanner
bca2634d54
Fix missing eval for string search in ssh controlpersist
2013-11-22 12:22:53 -05:00
James Tanner
a16fe923ed
Addresses #5011 check for proper string in smartos ssh error output
2013-11-22 12:13:24 -05:00
jctanner
5c84d7e445
Merge pull request #5002 from ovcharenko/devel
...
Allow to specify ansible_ssh_private_key_file location related to user home directory
2013-11-22 06:39:07 -08:00
James Tanner
512ebdb971
Revert "Merge pull request #5001 from ovcharenko/devel"
...
This reverts commit d6c3103a00
, reversing
changes made to b11f96eaa4
.
2013-11-22 00:09:37 -05:00
Aleksey Ovcharenko
9af44b1b42
Update to 4 space indent
2013-11-22 04:20:14 +02:00
Aleksey Ovcharenko
30678e04ac
Make tests happy
2013-11-22 04:06:10 +02:00
Aleksey Ovcharenko
2222f6df58
Allow to specify ansible_ssh_private_key_file location related to user home directory
2013-11-22 01:47:03 +02:00
Jan-Piet Mens
252a51be91
New lookup plugin csvreader
2013-11-21 09:39:52 +01:00
James Tanner
b815a09529
Fix pep8 error in password lookup
2013-11-19 16:36:18 -05:00
James Tanner
e81c976636
Fix pep8 errors in unarchive module
2013-11-19 16:35:06 -05:00
jctanner
68afd9da9f
Merge pull request #4866 from sergevanginderachter/known_hosts_sudo
...
Check real user's known_hosts when sudo ansible...
2013-11-19 12:13:24 -08:00
Brian Coca
34c33f7ea1
now correctly spell symmetric
...
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
2013-11-19 14:48:11 -05:00
Brian Coca
460bbfaec1
added union filter
...
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
2013-11-19 14:40:55 -05:00
Brian Coca
afe30a6633
added difference and symetric difference filters
...
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
2013-11-19 00:06:38 -05:00
Matt Haggard
389602b8dd
Merge pull request #4920 from iffy/ansible
...
Collect all stdout over ssh transport before returning data
2013-11-18 15:09:21 -05:00
Skylar Saveland
7bc64581d7
KeyError: 'delegate_to' no more
2013-11-17 21:26:17 -08:00
jctanner
04847191b4
Merge pull request #4879 from bcoca/unique_intersect
...
added unique and intersect filters for dealing with lists
2013-11-14 12:46:50 -08:00
jctanner
77affdefbc
Merge pull request #4585 from mscherer/connec_func
...
connection plugin to reuse the func/certmaster interface instead of ssh
2013-11-14 08:15:17 -08:00
jctanner
be67a6f815
Merge pull request #4625 from pileofrogs/devel
...
unarchive module & action plugin
2013-11-14 07:57:57 -08:00
James Tanner
33242cacf3
Merge pull request #4375 from pfalcon/ansible
...
copy: Implement recursive copying if src is a directory.
2013-11-13 15:52:40 -05:00
jctanner
6dd81f25d9
Merge pull request #4856 from akuznecov/devel
...
Resolves #4855 issue with synchronize module failing on multiple items
2013-11-12 15:37:26 -08:00
James Tanner
f31cb7c6e8
Merge pull request #4664 from jpmens/ansible
...
Lookup plugin for etcd
with support for configurable etcd URL in ansible.cfg (and environment)
2013-11-12 15:29:05 -05:00
jctanner
2cf335969f
Merge pull request #4738 from bcoca/assemble_action_plugin
...
assemble can now use src from master/origin
2013-11-12 08:23:39 -08:00
Brian Coca
efd87534eb
added unique and intersect filters for dealing with lists
...
Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>
2013-11-12 10:34:57 -05:00
James Tanner
6e49ee6cfc
Remove commented code block
2013-11-11 14:44:13 -05:00
James Tanner
288c33e286
Merge pull request #4078 from mkaluza/ansible
...
add 'chars' parameter to password plugin to allow custom character set
2013-11-11 14:30:49 -05:00
Serge van Ginderachter
80fd22dce6
Check real user's known_hosts when sudo ansible...
...
closes #4834
2013-11-09 13:29:39 +01:00
Alexander Kuznecov
9d2f9bf93c
resolves #4855
2013-11-09 00:14:55 +07:00
jctanner
8e8c8efc8f
Merge pull request #4769 from alanfairless/more-password-entropy-revised
...
Revised patch for more password entropy
2013-11-07 13:39:05 -08:00
jctanner
8d9b53b445
Merge pull request #4733 from sivel/4323-sudo-pass
...
Add ansible_sudo_pass hostvar support. Fixes #4323
2013-11-05 15:01:19 -08:00
James Tanner
c1ed47933b
Fixes #4485 add an ipv6 parameter to accelerate so that the daemon will bind to an ipv6 port instead of ipv4
2013-11-04 17:20:03 -05:00
Michael DeHaan
70c9028e1e
include_vars plugin should look in vars/ path for a role.
2013-11-02 09:34:44 -04:00
Michael DeHaan
99687749a3
Merge pull request #4775 from steverweber/fix-4640
...
dont sudo if sudo_user is the same as the connection user
2013-11-01 15:27:55 -07:00
Steve Weber
5bd52796ec
dont sudo if sudo_user is the same as the active user
2013-11-01 14:19:33 -04:00
Alan Fairless
0824f004d9
Revised patch for more password entropy
2013-11-01 09:51:35 -05:00
Michael DeHaan
51fbc6d20a
Further simplify the debug: var=foo action plugin code.
2013-10-31 19:39:32 -04:00
Michael DeHaan
bbf212a268
Simplify the way the debug: var=varname plugin works.
2013-10-31 19:35:50 -04:00
Michael DeHaan
7f125567cb
Some simplification of include_vars and renamed include_files to include_vars.
2013-10-31 19:24:35 -04:00
Michael DeHaan
b69ab89eb1
Merge branch 'include_files' of git://github.com/bennojoy/ansible into devel
2013-10-31 19:14:27 -04:00
Michael DeHaan
d34a26e307
Undo an inadvertant revert from template changes so we still allow pythonic imports in module land.
2013-10-31 16:53:05 -04:00
Brian Coca
ac40d15120
now assemble module is also action plugin and can use local source for
...
files
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
2013-10-30 21:40:42 -04:00
Michael DeHaan
7b331ef6ed
Fix code typo. I'll blame jet lag for now :)
2013-10-30 21:28:47 -04:00
Michael DeHaan
90cce35919
This allows variable references in playbooks in a different way.
2013-10-30 21:26:16 -04:00
Michael DeHaan
7201a6ffad
Evaluate the conditional for each item for modules that normally try to group with_items results
...
like yum and apt.
2013-10-30 20:35:33 -04:00
James Tanner
078aaa95a2
Revert 1f6edf7d76
and re-enable passing lists to yum and apt
2013-10-30 20:17:17 -04:00
Matt Martz
ea2ec6237a
Add ansible_sudo_pass hostvar support
2013-10-30 13:18:35 -05:00
James Tanner
d154bf8781
Revert templating enhancements from 73dbab70
e6c28658
d409352c
9858b1f2
4587528b
9b1fe455
214b0b05
8d3db803
7f9504d1
5031104c
35cb9dc2
2bd8cb57
1e85c754
2013-10-30 10:50:16 -04:00
James Tanner
0faecdf7d1
Fixes #4653 Set dest on results for copy module even if using file module
2013-10-28 22:50:55 -04:00
James Tanner
9249cf578d
Fixes #4572 Run until loop if until is set, ignoring result failures
2013-10-28 12:56:46 -04:00
bennojoy
b53e7353f9
include files
2013-10-28 17:40:09 +05:30
Michael DeHaan
603db60828
Merge pull request #4288 from sivel/3725-regex
...
Add regex (search, match, regex) jinja2 filters. Fixes #3725
2013-10-27 08:48:12 -07:00
Michael DeHaan
9858b1f2f3
Enable imports to work on a snippet based system, allowing for instance a library of common EC2 functions
...
to be reused between modules. See library/system/service and library/system/ping for initial examples. Can
work the old way to just import 'basic', or can import the new way to import multiple pieces of code from
module_utils/.
2013-10-26 11:09:30 -04:00
jctanner
43f48a2e02
Merge pull request #4167 from tima/rsync3
...
synchronization module take 3
2013-10-25 14:43:08 -07:00
James Tanner
1f6edf7d76
Fixes #4665 and #4666 If task is conditional do not flatten items list for packaging modules
2013-10-25 13:46:41 -04:00
Serge van Ginderachter
6277e770a1
include basedir as 'playbook_dir' variable
...
closes #4246
2013-10-25 07:53:52 +02:00
Jan-Piet Mens
bd5cd8e652
Lookup plugin for etcd
...
with support for configurable etcd URL in ansible.cfg (and environment)
2013-10-24 21:28:48 +02:00
James Cammarata
b9dd514713
Minor fix for putting 0-length files over accelerated connections
...
Fixes #4652
2013-10-23 13:09:25 -07:00
Dylan Martin
2c28e1daea
unarchive module & action_plugin added
2013-10-21 15:22:42 -05:00
Timothy Appnel
cbae9c913e
synchronize module src and dest handles template markers.
2013-10-19 22:39:25 -04:00
Michael DeHaan
5031104c3a
Finishing touches on template cleanup.
2013-10-19 11:40:48 -04:00
Michael Scherer
af796d6556
connection plugin to reuse the func/certmaster interface instead of ssh
...
This plugin permit to use func to run playbook and ansible command instead
of ssh. It can be used for a smooth transition from func/taboot to ansible by
letting people use ansible without having to change their network architecture.
2013-10-19 00:32:59 +02:00
Brian Coca
c476ed93ca
now correctly changes script permission in all cases
...
Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>
2013-10-18 16:52:15 -04:00
Michael DeHaan
b0f6e77f66
Merge pull request #4571 from tgerla/whitespace
...
add_group module: strip trailing/leading whitespace from comma-separated group names
2013-10-17 16:09:09 -07:00
Tim Gerla
51a1709253
add_group module: strip trailing/leading whitespace from comma-separated group names
2013-10-17 14:13:55 -07:00
James Tanner
242f20c297
Fixes #4402 wrong order for isinstance parameters in dnstxt.py
2013-10-17 15:43:39 -04:00
Gabe Mulley
84a57b7545
ensure non-root users can read arguments file when using sudo_user
...
Non-standard modules must read in the arguments file in order to access their arguments, however, when this file is transfered to the remote host it may only have the permissions 600. This means that using sudo and sudo_user will result in permission denied errors when attempting to read the arguments file.
This patch fixes #4438 by explicitly forcing the arguments file to be world readable before executing the module.
2013-10-16 08:18:11 -04:00
Paul Sokolovsky
2e668f14f7
copy: Handle "no copy/propagate attrs only" for recursive mode well.
...
For this, add internal "original_basename" param to file module,
similar to copy module. (Param name is a bit misnormer now, should
be treated as "original basepath").
2013-10-15 18:40:40 +03:00
Paul Sokolovsky
ce88df3cf4
copy: Handle dest path variations for recursive mode.
2013-10-15 18:40:39 +03:00
Paul Sokolovsky
6cf3975e2e
copy: Set suitable default result for check mode.
2013-10-15 18:40:39 +03:00
Paul Sokolovsky
612b446856
copy: Don't modify input module_args in a recursive file handling loop.
2013-10-15 18:40:39 +03:00
Paul Sokolovsky
b3b4f9885f
copy: Implement recursive copying if src is a directory.
...
If src param to copy is a directory, all files under it are collected
and pushed one by one to target. Source dir path handled in a way
simalar to rsync: if it ends with slash, only inside contents of
directory are copied to destination, otherwise the dir itself is
copied (with all contents of course). Original idea and implementation
by https://github.com/ansible/ansible/pull/1809 . Rewritten to address
review comments and simplify/correct logic.
2013-10-15 18:40:39 +03:00
Michael DeHaan
e131de4de0
Added "debug: var=variableName" capability.
2013-10-14 21:01:38 -04:00
egghead
ca7e2d283c
Adding os realpath filter.
...
This is particularly useful when wanting to get the absolute path of filepaths found by the 'fileglob' filter.
This also lets you provide absolute paths to roles, which search for files in different areas unless absolutely pathed.
2013-10-14 23:41:16 +00:00
Michael DeHaan
41aaad69aa
Make add_host clear the inventory pattern cache, add some more aliases. Fixes #4442 .
2013-10-11 16:37:10 -04:00
jctanner
65ef6a62dc
Merge pull request #4425 from jeromew/ansible_sudo_user_with_items
...
Template sudo_user via with_items
2013-10-11 10:18:46 -07:00
Matt Martz
61525a97df
Add regex (search, match, regex) jinja2 filters. Fixes #3725
2013-10-11 08:03:04 -05:00
Serge van Ginderachter
c4d20094b4
make changed filter understand results lists
2013-10-10 22:08:38 +02:00
Serge van Ginderachter
e5d45311f9
Implement a |changed filter plugin
2013-10-10 21:34:37 +02:00
jeromew
dec364ae80
Template sudo_user via with_items
2013-10-10 09:22:26 +00:00
Michael DeHaan
3f968ff46a
Check one more skipped scenario in with_subelements.
2013-10-09 17:14:42 -04:00
James Cammarata
9124ebb4f1
Clear out complex_args before running async_status
...
When using complex args with an async task, the subsequent runs of
async_status would inherit them, causing a module error (invalid params).
Fixes #3150
2013-10-09 15:08:47 -05:00
Michael DeHaan
2078518735
Allow subelements to work right with skipped results.
2013-10-09 15:55:47 -04:00
Michael DeHaan
5ed28efe45
Script module should return changed attribute so handlers always fire, unless "changed_when" is specified.
...
Fixes #4053
2013-10-07 17:06:25 -04:00
Michael DeHaan
a7adc8ef4d
Allow doing things like "groups.groupname" in with_nested.
...
Fixes #3858
2013-10-07 16:58:29 -04:00
Michael DeHaan
19386c43a7
Merge
2013-10-07 10:02:21 -04:00
James Cammarata
d10582225b
Merge branch 'issue_4215_fetch_expanduser' into devel
2013-10-07 08:27:52 -05:00
Stoned Elipot
e7957b6d58
Fix group_by: do not group a host for which a condition is false
2013-10-07 08:44:42 -04:00
Michael DeHaan
65178290e7
Merge branch 'devel' of git://github.com/nextus/ansible into devel
...
Conflicts:
lib/ansible/constants.py
2013-10-07 08:39:23 -04:00
Michael DeHaan
4987c73bb6
Proper check for raw as module options versus raw being in the string.
2013-10-06 09:54:28 -04:00
James Tanner
52aea868df
Allow for updating host vars in add_host
2013-10-04 16:15:17 -04:00
James Cammarata
d21714a37f
Fix for network byte order issues in accelerate
2013-10-02 15:37:15 -05:00
James Cammarata
912e3a7b0b
Merge branch 'accelerate_improvements' into devel
...
Conflicts:
library/utilities/accelerate
2013-10-01 21:22:17 -05:00
James Cammarata
fa80a17aa3
Make recv_data less greedy so it doesn't eat other packets
2013-10-01 16:50:32 -05:00
James Cammarata
12f6957596
Cleaning up some vvvv log messages in accelerate
2013-10-01 15:34:58 -05:00
James Cammarata
8c17711247
Removing accelerate_timeout as a playbook option
...
This will remain in ansible.cfg only.
2013-10-01 15:33:18 -05:00
James Cammarata
d317103371
Added in an accelerate connection timeout setting
2013-10-01 15:28:59 -05:00
James Cammarata
59a5ce23d9
Adding an accelerate_timeout parameter for plays
...
This setting makes the timeout for each play configurable, rather than
hard-coding it at 300 seconds (now the default if left unspecified)
Fixes #4162
2013-10-01 15:26:50 -05:00
James Cammarata
f9c87868ac
Added keepalive packets to accelerate mode
...
Commands will now be started up in a separate task from the main
handler thread, so that it can be monitored for completeness while
sending a keepalive packet back to the controller to avoid a socket
receive timeout.
2013-10-01 15:19:21 -05:00
jctanner
32a1dd422c
Merge pull request #4269 from jphalip/issue-4256
...
In the script action: Get around a Python bug.
2013-09-30 20:24:49 -07:00
James Cammarata
52a42bf607
Add more verbose debugging options for accelerate
2013-09-30 14:08:07 -05:00
Matt Martz
535ce97067
Add fileglob Jinja2 filter. Fixes #3563
2013-09-30 12:55:13 -05:00
Julien Phalip
44aeea7afc
In the script action: Get around a bug in that's been fixed in Python 2.7 but not Python 2.6.
...
See: http://bugs.python.org/issue6988
Fixes #4256 .
2013-09-27 08:57:07 -07:00
Preston Marshall
3ee7b177e8
Allow storing input from user in a pause prompt
2013-09-25 17:28:25 -05:00
James Cammarata
994dfb84fc
Minor pep8 cleanup and CHANGELOG update for do-until
2013-09-25 15:51:49 -05:00
James Cammarata
202c4f5294
Merge branch 'do_until_14' of https://github.com/bennojoy/ansible into bennojoy-do_until_14
2013-09-25 15:49:14 -05:00
James Cammarata
478c400817
Minor pep8 cleanup in the new jail connection plugin
2013-09-25 14:48:30 -05:00
James Cammarata
0e0595bdb2
Merge branch 'jail' of https://github.com/mscherer/ansible into mscherer-jail
2013-09-25 14:47:24 -05:00
bennojoy
70a9a797fa
Fix for accelerate when ansible_ssh_user is specified
2013-09-25 19:24:54 +05:30
nextus
ca96d74572
#4227 in upstream repo
2013-09-25 16:15:49 +04:00
bennojoy
0e749611ac
doc update and add attempts
2013-09-25 09:56:14 +05:30
bennojoy
21529de82e
dountil feature commit 2
2013-09-24 15:23:01 +05:30
bennojoy
53e48b63a9
dountil feature commit 1
2013-09-24 13:59:38 +05:30
James Cammarata
2f39d37a97
Expand destination path in the fetch action
...
Fixes #4215
2013-09-23 20:23:48 -05:00
Michael DeHaan
319a0f9523
Merge pull request #4154 from mplonka/AIX_MD5
...
using AIX 'csum' command for generating MD5 checksums
2013-09-23 08:27:12 -07:00
Michael DeHaan
7f8126a6c9
Merge pull request #4168 from nigelm/md5_filter
...
Added md5 as a jinja filter - returns hex digest of input
2013-09-23 08:21:11 -07:00
Andrey Shorin
cb4b964070
Allow for dynamic accelerate_port: and port: in plays
2013-09-23 13:33:36 +04:00