mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 06:30:19 -07:00
Use locking for concurrent file access (#52567)
* Use locking for concurrent file access This implements locking to be used for modules that are used for concurrent file access, like lineinfile or known_hosts. * Reinstate lock_timeout This commit includes: - New file locking infrastructure for modules - Enable timeout tests - Madifications to support concurrency with lineinfile * Rebase, update changelog and tests We need to specify ansible_python_interpreter to avoid running interpreter discovery and selecting the incorrect interpreter. Remove the import of lock in known_hosts since it is not used.
This commit is contained in:
parent
dc6c0cb9f8
commit
e152b277cf
9 changed files with 363 additions and 225 deletions
|
@ -84,7 +84,6 @@ import re
|
|||
import tempfile
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.common.file import FileLock
|
||||
from ansible.module_utils._text import to_bytes, to_native
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue