user = subprocess.check_output(['config-get', 'user'])
passwd = subprocess.check_output(['config-get', 'passwd'])
utils.manager(username=user, passwd=passwd)
I think this would be okay in both cases. The bash case would strip out newlines, anyway and the python case should probably cleaning up stdout anyway. I'll give this branch just another test one more time otherwise LGTM.
Sorry for the delay. I had meant to test to use case I had in mind but haven't gotten to it yet. Looking at it again, I think this is generally okay.
I was thinking of a case where i'd like to store a passwd outside of the charm in a file, eg:
service1: { file:// /home/adam/ .services/ passwd
options: {
user: adam
passwd: include-
}
}
and have the charm do something like:
service-manager user-create username= $(config- get username) password= $(config- get passwd)
OR
user = subprocess. check_output( ['config- get', 'user']) check_output( ['config- get', 'passwd']) username= user, passwd=passwd)
passwd = subprocess.
utils.manager(
I think this would be okay in both cases. The bash case would strip out newlines, anyway and the python case should probably cleaning up stdout anyway. I'll give this branch just another test one more time otherwise LGTM.