Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-7211

Ini_setting resource able to query file fields

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: inifile
    • Labels:
      None
    • Template:
    • Epic Link:
    • Team:
      Modules
    • CS Priority:
      Reviewed
    • QA Risk Assessment:
      Needs Assessment

      Description

      Hi, 

      The customer is looking to query the file using ini_setting type using command puppet resource ini_setting /etc/puppetlabs/puppet/puppet.conf.  It will give great flexibility to write code and update config files without any mistakes. For example, puppet resource file /etc/puppetlabs/puppet/puppet.conf will give details about file puppet.conf and If we need to change any values or require any update we can use the output to write manifest. 

      Ex : 

      cat /etc/puppetlabs/puppet/puppet.conf

      [main]
      certname = pe-2016410-master.puppetdebug.vlan
      server = pe-2016410-master.puppetdebug.vlan

       

      Expected result : 

      puppet resource ini_setting /etc/puppetlabs/puppet/puppet.conf

       

      ini_setting

      { '[puppet_conf]server': ensure => present, section => 'main', setting => 'server', value => 'pe-2016410-master.puppetdebug.vlan', path => '//etc/puppetlabs/puppet/puppet.conf', }

      ini_setting

      { '[puppet_conf] certname': ensure => present, section => 'main', setting => 'certname', value => 'pe-2016410-master.puppetdebug.vlan', path => '/etc/puppetlabs/puppet/puppet.conf'', }

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                karthikeyan.kanagaraj Karthikeyan Kanagaraj
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Zendesk Support