Browse Source

roles/cotainer_file_read: port to Python 3

Make it work on Python3, even if deprecated with the new `ssh_lxc`
connection plugin.

Now you can use directly the `slurp` native module with delegation to
the lxc guest.

May be useful only in case where it is impossible to get python3 or
other ansible requirements on the lxc guest.
python3
Zolfa 4 years ago
parent
commit
0302301dc8
Signed by: zolfa GPG Key ID: E1A43B038C4D6616
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      library/container_file_read.py

+ 1
- 1
library/container_file_read.py View File

@ -30,7 +30,7 @@ def read_file_in_container(args):
path = path,
text = lines.read().strip('\n'),
)
except IOError, e:
except IOError as e:
module.exit_json(
msg = e,
path = path,


Loading…
Cancel
Save