ansible/lib/ansible/modules
Mark Mielke b4a1542670 Reduce the system calls performed by the "file" module
when using "state: link", and particularly when using
"force: yes".

Symbolic link resolution can be expensive. In our case,
the symbolic links are legacy links to automounts, and
the "file" task was causing all of the legacy links to
be traversed and mounted on every host every time the
task executed, even when the links were correct and there
was nothing to do.

This change avoids the system calls that perform the
symbolic link resolution by taking advantage of the short
circuit behaviur of the boolean "and" operator. The code
behaviour is unchanged except that it no longer performs
unnecessary system calls.

As it turns out, this change is not sufficient to fully
solve the symbolic link resolution problem, as the "file"
module still performs a stat() at the end of execution to
provide the caller with information about the file.
However, this change is very simple, it will eliminate
unnecessary system calls in a number of use cases, and it
gets the "file" module closer to the desired end result.
2017-01-24 12:31:25 -08:00
..
cloud vmware_guest: Amazing speed up module (#19937) 2017-01-24 11:42:37 -05:00
clustering Add pacemaker cluster module for being managable with ansible (#19594) 2017-01-03 15:50:00 +00:00
commands updated docs to suggest quote filter for shells 2017-01-10 16:19:22 -05:00
crypto Relocating extras into lib/ansible/modules/ after merge 2016-12-08 11:35:18 -05:00
database Support forced SSL-verified connection with given CA certificate 2017-01-16 12:17:10 -08:00
files Reduce the system calls performed by the "file" module 2017-01-24 12:31:25 -08:00
identity minor spelling changes 2016-12-13 13:51:13 -05:00
inventory
messaging Fix code-blocks to use correct syntax highlighting 2017-01-08 09:18:45 -08:00
monitoring Add logstash_plugin to manange logstash plugins (#20592) 2017-01-24 15:52:51 +00:00
network vyos_command 2.3 (#18994) 2017-01-23 15:30:19 -05:00
notification hipchat: improve documentation (#20445) 2017-01-19 11:15:54 +00:00
packaging Issue #20179 Fix doc string handler notify call (#20499) 2017-01-20 08:00:26 -05:00
remote_management - If katello sends manifest did not change, do not report a change. - Allow support of repository_sets that do not have a releasever, like the Red Hat Satellite Tools 6.2 for RHEL 7 Server RPMs x86_64 set. (#19022) 2017-01-19 09:19:19 -08:00
source_control Fix git remote url change detection. (#20587) 2017-01-23 16:09:42 -08:00
storage Modules for gathering facts about ZFS datasets and pools (#19181) 2017-01-09 07:53:42 +00:00
system added formatting 2017-01-23 13:29:14 -05:00
utilities Use M() to link to the replacement module. (#19976) 2017-01-06 16:21:39 +00:00
web_infrastructure Fix argument name to fail_json(), detail -> details 2017-01-18 12:23:36 -08:00
windows win_robocopy: Small cleanup (#20515) 2017-01-24 10:40:14 -05:00
__init__.py Re-adding the init py for modules 2016-12-08 11:35:20 -05:00