Hi

  I have written a module to handle this bit - 
https://github.com/ritzk/ansible-modules-extras . reviews/feedback would be 
welcome.

Thanks
-ritz


On Wednesday, 7 August 2013 03:14:50 UTC+5:30, Michael DeHaan wrote:
>
> Right now this uses config parser so it would need to be updated to not 
> use config parser.
>
> I'm inclined to believe that might be more trouble than it is worth.
>
>
>
>
> On Tue, Aug 6, 2013 at 3:20 PM, Drew Northup <---> wrote:
>
>> The standard /etc/php.d/opcache.ini file is in ini format yet has no 
>> sections. If I try to use the ini_file module to change one value (say 
>> opcache.memory_consumption) without specifying some sort of "section=" it 
>> fails because I didn't do so (so far ok, as that matches the 
>> documentation), but if I do specify "section=" with nothing following the 
>> equals sign it core dumps:
>>
>> TASK: [setup opcache] 
>> *********************************************************
>> fatal: [gandalf-new.umcs.maine.edu] => failed to parse: Traceback (most 
>> recent call last):
>>   File 
>> "/home/ansible/.ansible/tmp/ansible-1375815734.01-249448475333554/ini_file", 
>> line 1079, in <module>
>>     main()
>>   File 
>> "/home/ansible/.ansible/tmp/ansible-1375815734.01-249448475333554/ini_file", 
>> line 176, in main
>>     changed = do_ini(module, dest, section, option, value, state, backup)
>>   File 
>> "/home/ansible/.ansible/tmp/ansible-1375815734.01-249448475333554/ini_file", 
>> line 98, in do_ini
>>     cp.readfp(f)
>>   File "/usr/lib64/python2.6/ConfigParser.py", line 305, in readfp
>>     self._read(fp, filename)
>>   File "/usr/lib64/python2.6/ConfigParser.py", line 482, in _read
>>     raise MissingSectionHeaderError(fpname, lineno, line)
>> ConfigParser.MissingSectionHeaderError: File contains no section headers.
>> file: /etc/php.d/opcache.ini, line: 2
>> 'zend_extension=/usr/lib64/php/modules/opcache.so\n'
>>
>>
>> YAML fragment from the play:
>>
>> - name: setup opcache
>>   ini_file: dest=/etc/php.d/opcache.ini
>>             option=opcache.memory_consumption
>>             value=256
>>             section=
>>
>> Given that there's a fair number of things I've run across that use INI 
>> formatted files WITHOUT sections, I was hoping I could work with these 
>> WITHOUT using the template module.
>>
>> (Running version 1.2.2)
>>
>> -- 
>> ---------------------------------+--------------------------------------
>> Drew Northup                     |          Technical Support Specialist
>> University of Maine System       |                [email protected]
>> Computing Center                 |                 phone: (207) 561-3513
>> Orono, ME 04469                  |                   fax: (207) 561-3531
>>  
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>
>
> -- 
> Michael DeHaan <[email protected] <javascript:>>
> CTO, AnsibleWorks, Inc.
> http://www.ansibleworks.com/
>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f800808e-9de2-456a-9de8-1ac6a1000bd6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to