Hi Alex!

I really appreciate if you can share your module.

I couldn't find any solution to my problem of block insertion in arbitrary 
existing file on windows host.

суббота, 31 декабря 2016 г., 12:27:34 UTC+3 пользователь Alexander Lüders 
написал:
>
> Hi Joe,
>
> thanks for your reply and sorry that I am catching up so late.
>
> I thought about using win_template but I does not work for me, as I do not 
> have all the necessary input at that point to assemble the whole file 
> myself. It would require shifting quite some application knowledge which is 
> just not feasible (yet).
> Nevertheless, thanks for the suggestion.
>
> Instead I started working on the win_blockinfile module. It is basically a 
> Windows port of the existing blockinfile Unix module. Some features are 
> stripped like the permission stuff or the validation of the modified file.
> For the backup functionality I was looking for a powershell helper 
> function for creating backups like there is with the python method 
> AnsibleModule#backup_local (basic.py). I currently copied the function 
> win_lineinfile#BackupFile, which I do not like at all. Is there a central 
> location for utility powershell functions like this? 
> On your 'Developing Modules' page in appendix 'Module Utilities' you list 
> a bunch of python utilities but only one powershell utility file: 
> powershell.ps1.
> Is there anything else? Could you give me some advice here?
>
> Anyway, I progressed quite far. Most of the implementation is done, tests 
> as well...
>
> Greets,
> Alex
>
> Am Dienstag, 6. Dezember 2016 10:18:48 UTC+1 schrieb jhawkesworth:
>>
>> Just catching up with the group messages.  I haven't heard of anyone 
>> doing this, so I reckon go ahead.
>> I would just make sure you can't already do what you need using template 
>> / win_template before spending your time on this though.
>>
>> Jon
>>
>> On Tuesday, November 29, 2016 at 6:18:23 PM UTC, Alexander Lüders wrote:
>>>
>>> Hi all,
>>>
>>> do you know of an existing Windows port of the blockinfile module?
>>> Or is anybody already working on it?
>>>
>>> If not, I'd like to go ahead and create a win_blockinfile module.
>>>
>>> Greets,
>>> Alex
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/e3690b33-4451-4345-bfad-7474e7aa1dad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to