mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-22 22:11:44 -07:00
Use path type for blockinfile 'dest' argument (#2192)
This commit is contained in:
parent
7802a3a8c9
commit
814efc1418
1 changed files with 2 additions and 2 deletions
|
@ -188,7 +188,7 @@ def check_file_attrs(module, changed, message):
|
||||||
def main():
|
def main():
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec=dict(
|
argument_spec=dict(
|
||||||
dest=dict(required=True, aliases=['name', 'destfile']),
|
dest=dict(required=True, aliases=['name', 'destfile'], type='path'),
|
||||||
state=dict(default='present', choices=['absent', 'present']),
|
state=dict(default='present', choices=['absent', 'present']),
|
||||||
marker=dict(default='# {mark} ANSIBLE MANAGED BLOCK', type='str'),
|
marker=dict(default='# {mark} ANSIBLE MANAGED BLOCK', type='str'),
|
||||||
block=dict(default='', type='str', aliases=['content']),
|
block=dict(default='', type='str', aliases=['content']),
|
||||||
|
@ -204,7 +204,7 @@ def main():
|
||||||
)
|
)
|
||||||
|
|
||||||
params = module.params
|
params = module.params
|
||||||
dest = os.path.expanduser(params['dest'])
|
dest = params['dest']
|
||||||
if module.boolean(params.get('follow', None)):
|
if module.boolean(params.get('follow', None)):
|
||||||
dest = os.path.realpath(dest)
|
dest = os.path.realpath(dest)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue