Skip to content

Commit

Permalink
Restore compatibility with Ansible prior to 1.8.0
Browse files Browse the repository at this point in the history
Use params.get() for "follow" parameter with default value None.

Reference: #4
  • Loading branch information
yaegashi committed Apr 29, 2015
1 parent 64cece7 commit 405c100
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/blockinfile
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def main():

params = module.params
dest = os.path.expanduser(params['dest'])
if module.boolean(params['follow']):
if module.boolean(params.get('follow', None)):
dest = os.path.realpath(dest)

if os.path.isdir(dest):
Expand Down

0 comments on commit 405c100

Please sign in to comment.