ini file not created if ensure is set to package version

Open
#517 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
php
Domain
devops

Research direction

Start with the php::extensions declaration for pdo_sqlsrv and trace the Php::Extension::Config[pdo_sqlsrv] resource shown in the log. Reproduce the supplied Puppet configuration with ensure set to 5.3.0 and inspect how the File resource handles the missing ini. Done means /etc/php/7.0/mods-available/pdo_sqlsrv.ini is created and is not removed on subsequent Puppet runs.

Written by the indexing model from the issue text.

Description

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.13
  • Ruby: 2.3.3
  • Distribution: Debian 9
  • Module version: 6.0.2

How to reproduce (e.g Puppet code you use)

php::extensions:
    pdo_sqlsrv:
      ensure: '5.3.0'
      provider: pecl
      header_packages:
        - unixodbc-dev

What are you seeing

pdo_sqlsrv.so exists, but /etc/php7.0/mods-available/pdo_sqlsrv.ini does not exist. If manually created, it is removed by puppet.

What behaviour did you expect instead

pdo_sqlsrv.ini should be created.

Output log

Debug: /Stage[main]/Php/Php::Extension[pdo_sqlsrv]/Php::Extension::Config[pdo_sqlsrv]/File[/etc/php/7.0/mods-available/pdo_sqlsrv.ini]: Nothing to manage: no ensure and the resource doesn't exist

Dominant language
Puppet
Stars
86
Forks
264
Avg merge
29m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from voxpupuli/puppet-php

All issues in voxpupuli/puppet-php

Similar issues

More DevOps issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.