19:07:24 #startmeeting ansible core public irc 19:07:24 Meeting started Tue Jun 26 19:07:24 2018 UTC. 19:07:24 This meeting is logged and archived in a public location. 19:07:24 The chair is bcoca. Information about MeetBot at http://wiki.debian.org/MeetBot. 19:07:24 Useful Commands: #action #agreed #halp #info #idea #link #topic. 19:07:24 The meeting name has been set to 'ansible_core_public_irc' 19:08:05 #topic https://github.com/ansible/ansible/issues/12034 19:08:33 -1, that is what script module is for (top of my head) 19:09:14 anyone else on this issue? 'support multiline scripts in shell/command modules' 19:09:23 "use script please" 19:10:03 -1 use script module 19:10:20 shell: "{{ lookup('file', mycoolscript.sh }}" 19:10:29 I don't want to see playbooks with inline scripts as a thing. 19:10:48 Hello 19:10:54 elloh 19:11:08 #chair ryansb sdoran jtanner abadger1999 19:11:08 Current chairs: abadger1999 bcoca jtanner ryansb sdoran 19:11:09 -1 use `script` 19:11:13 * abadger1999 is for using script 19:11:13 Ansible is not opinionated on many things, but I'm ok with being opinionated on this point. 19:11:16 #chair gundalow 19:11:16 Current chairs: abadger1999 bcoca gundalow jtanner ryansb sdoran 19:11:35 ok, so we all agree, support it on shell/command and sdoran will make it so? 19:11:47 hah 19:11:52 baitnswitch 101 19:11:53 Wait, wah?? 19:11:59 kdding 19:12:21 ok, seems no brainer, 'use script' is unanimous 19:12:33 #topic https://github.com/ansible/ansible/pull/39656 19:12:52 Hi 19:12:54 @farhan7500 you dont need to bring it up each meeting, you can continue with reviewers on ticket 19:13:27 Wanted to ask about the integration test 19:14:03 ok, but fyi, we have testing group meeting that is more appropos, will try to answer here now what we can 19:14:30 The simulator that was mentioned in the last meeting has a static output on which the tests can be run, will that be okay as fas ar integration tests are concerned 19:14:34 *far 19:15:07 it's better than nothing, imo 19:15:16 ^ was going to say same 19:15:29 static are not great, but much better than no test at all 19:15:52 okay, thanks 19:16:07 gah, I suck. Got caught up in issue backlogs 19:16:11 And for the PR, the reviews gave been addressed 19:16:33 So, can that be +1'd/further reviewed? 19:16:36 it's arguable that the static simulator is no different than unit testing, but having the whole system run through from playbook to module execution can uncover things the unit tests don't 19:16:45 who was reviewing last? i only see dag 19:16:54 #chair sivel 19:16:54 Current chairs: abadger1999 bcoca gundalow jtanner ryansb sdoran sivel 19:16:55 Yes, and pilou 19:17:06 jtanner: its 'bigger unit' test 19:17:18 k, just ping them in ticket 19:17:24 cc @dag @pilou 19:17:45 Okay, thanks 19:18:12 well, if that is all, can end meeting early 19:18:28 https://github.com/ansible/community/issues/317#issuecomment-400348330? 19:18:30 #topic https://github.com/ansible/proposals/issues/121 19:19:17 A few of the core team members have discussed this and this is what we came up with. 19:19:29 +1 for output encoding part, +0 on input, people are going to misinterpet that massively 19:20:08 and this can get very tricky, template is the easy case, lineinfile, assemble, etc can have multiple encodings involved 19:20:12 this is all transparent to the end user right? 19:20:25 jtanner: not really, end user must set the option 19:20:26 jtanner: no 19:20:27 users would have to set encodings on a per task basis 19:20:42 right now we hammer everything though the square peg of utf8 19:20:45 the word "option" isn't in the proposal 19:20:45 They're standardized names and expectations for module parameters 19:20:56 nor is there an example task 19:21:06 therefore i had to ask 19:21:09 Hmm.. I used parameter everywhere instead of option. 19:21:10 > A module or plugin may add a parameter for input, a parameter for 19:21:12 output, or two parameters, one for input and one for output 19:21:13 jtanner: he uses 'parameter', but its a module optoin 19:21:36 k, i see 19:21:43 again, output is the easy one, single encoding all transformed to it 19:21:54 the problem is that there is almost never a single input and encodings get mixed 19:22:17 lineinfile I think needs to have input_encoding and output_encoding... I was thinking if I had time for 2.7 I would both of those parameters to lineinfile in addition to template. 19:22:32 I am +1 19:22:38 abadger1999: but it also takes 'input' from play in the form of 'random text to insert' 19:22:42 if we're only going to handle single encodings for files, input_encoding is easy. 19:22:48 i'm not smart enough to vote on this one 19:22:52 has to be very clear what encoding that is expected in (utf8) 19:23:20 the 'original file encoding' is what input_encoding would cover in that case 19:23:46 As written in the problems not solved section, files with multiple encodings should be handled by modules which deal with "binary" content 19:24:03 no, assuming file has single encoding 19:24:10 Yes, it is "encoding of the file I am reawding and then operating on" 19:24:16 you still have issue that the 'text to insert' is in play, which is utf8 19:24:21 No we don't 19:24:32 how not? 19:24:33 That's not a problem. 19:25:07 until someone uses incompatible nonut8 in play and expects that you take it as the input_encoding, just saying we need to be very clear on 'which inputs' are affected 19:25:22 file is read in and decoded using the input_encoding. It is then text. You combine that with text from the play. Then you write it out using the output_encoding. 19:25:38 agreed, but text from play is utf8 19:25:42 Yes, the proposal is. 19:26:30 ? 19:26:35 Making it obvious from the module parameter names, is harder. 19:26:56 no, not asking that, i mean, you 'could' but 'original_file_to_replace_encoding' gets long 19:26:58 bcoca: "we need to be very clear on 'which inputs' are affected" abadger1999: "Yes, the proposal is." 19:27:03 just need to stress very well in descriptions 19:27:21 i seem to be missing that part, you dont talk about mixed inputs 19:27:32 you talk about files with multple encodings 19:28:30 Vars files, inventory, playbooks, and other Ansible resources 19:28:32 This proposal makes no attempt to change the format of files and resources which are Ansible's to define the format of. These are still always encoded under utf-8. 19:28:39 For instance 19:29:12 ah, wasnt clear to me from that sentence, caveat withdrawn 19:29:32 * bcoca wants flashing red letters in all caps for users 19:30:07 If you have sample example text for the input_encoding descriptions, I can make sure that gets put into hte module guidelines. 19:30:40 mostly describe exact scope, for lineinfile 'this is the encoding for the original file to be read and edited, nothing else' 19:30:48 19:31:25 If I port lineinfile, then I could include its description in the examples in the coding guidelines 19:31:34 just something to point at when someone complains their var in klingonese ISO is not properly translated cause utf8 pushes the codepoint to diff byte combo 19:31:42 +10 19:32:39 he .. just realized, diff encoding will now also means files change .. but the 'diff' in response can be very tricky to display ... 19:32:59 Yeah, but that's always been the case. 19:33:20 cause we bashed everything into utf8 19:33:23 I've fixed bugs where the diff was not valid utf-8 before. 19:33:31 and caused tracebacks 19:33:58 Well, if there's no objections, I'll record the proposal as accepted and get to work on the documentation and implementation in the template module. 19:34:21 andi would recomend 'replace' as 2nd module ... lineinfile i would leave for later 19:35:05 abadger1999: go4it 19:35:09 Cool. 19:35:16 lininfile is core. replace is community. 19:35:19 another caveat, copy ... not sure we want to support it there, as normally it doesnt edit the file 19:35:28 It's in the proposal 19:35:37 abadger1999: depending on the number you want to do, pull in webknjaz 19:35:37 ^ that is soo wrong ... shoudl be reverse 19:35:42 copy should not have an input or output encoding. 19:35:59 because it just copies the raw file over the wire. 19:36:07 doesn't do any manipulation. 19:36:09 abadger1999: there is only 1 case , content= but i would then push people to temlpate 19:36:14 yep. 19:36:29 i did see you mention copy, but not content 19:36:32 I thought of content and then thought... bcoca will love me if I leave that case out ;-) 19:36:42 yes, yes i will 19:36:46 ;-) 19:37:07 keep in mind jinja native is gonna give you back what you gave it, instead of munging it into something else 19:37:34 Strings will all still be text, though. We won't give bytes to jinja2. 19:37:58 (although it might be harder to catch bugs in that case with native types on) 19:38:02 its inputs are either utf8 direclty or unicode 19:38:20 or int or bool or whatever they make 19:38:29 I believe it has to be text type or ascii. 19:38:47 At least on python2, I think that non-ascii (even utf-8) will cause a traceback in jinja2 19:43:10 Looks like python3 is even stricter, even ascii byte strings cause interesting things to happen (errors or reprs of the byte type) 19:43:15 anyhow :-) 19:43:23 Cool. No more from me on this. 19:45:07 #topic open floor 19:46:22 closign if no business in 1min 19:47:14 #endmeeting