Go to file
Mark Gomersbach 39b1307671 fix(map.jinja): fix useflags regex (gentoo)
* fix(map.jinja): fix useflags regex

When using version inside useflag, the sls_block macro with ebuildpkg regex result in a range error.
Replacing the version argument with uses seem to work as escapes don't really work there.

fix(map.jinja): replace all problematic lines
fix(map.jinja): update available targets

```
----------
          ID: php_install_imagick_dev-php-pecl-imagick
    Function: pkg.installed
        Name: dev-php/pecl-imagick
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/lib64/python3.6/site-packages/salt/state.py", line 1933, in call
                  **cdata['kwargs'])
                File "/usr/lib64/python3.6/site-packages/salt/loader.py", line 1951, in wrapper
                  return f(*args, **kwargs)
                File "/usr/lib64/python3.6/site-packages/salt/states/pkg.py", line 1563, in installed
                  **kwargs)
                File "/usr/lib64/python3.6/site-packages/salt/states/pkg.py", line 651, in _find_install_targets
                  for name, version in desired.items()
                File "/usr/lib64/python3.6/site-packages/salt/states/pkg.py", line 652, in <listcomp>
                  if not (name in cur_pkgs and (version is None or _fulfills_version_string(cur_pkgs[name], version)))
                File "/usr/lib64/python3.6/site-packages/salt/states/pkg.py", line 216, in _fulfills_version_string
                  fullfills_all = fullfills_all and _fulfills_version_spec([installed_version], operator, version_string, ignore_epoch=ignore_epoch)
                File "/usr/lib64/python3.6/site-packages/salt/states/pkg.py", line 234, in _fulfills_version_spec
                  if (oper == '==' and fnmatch.fnmatch(ver, desired_version)) \
                File "/usr/lib64/python3.6/fnmatch.py", line 36, in fnmatch
                  return fnmatchcase(name, pat)
                File "/usr/lib64/python3.6/fnmatch.py", line 70, in fnmatchcase
                  match = _compile_pattern(pat)
                File "/usr/lib64/python3.6/fnmatch.py", line 46, in _compile_pattern
                  return re.compile(res).match
                File "/usr/lib64/python3.6/re.py", line 233, in compile
                  return _compile(pattern, flags)
                File "/usr/lib64/python3.6/re.py", line 301, in _compile
                  p = sre_compile.compile(pattern, flags)
                File "/usr/lib64/python3.6/sre_compile.py", line 562, in compile
                  p = sre_parse.parse(p, flags)
                File "/usr/lib64/python3.6/sre_parse.py", line 855, in parse
                  p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
                File "/usr/lib64/python3.6/sre_parse.py", line 416, in _parse_sub
                  not nested and not items))
                File "/usr/lib64/python3.6/sre_parse.py", line 765, in _parse
                  p = _parse_sub(source, state, sub_verbose, nested + 1)
                File "/usr/lib64/python3.6/sre_parse.py", line 416, in _parse_sub
                  not nested and not items))
                File "/usr/lib64/python3.6/sre_parse.py", line 553, in _parse
                  raise source.error(msg, len(this) + 1 + len(that))
              sre_constants.error: bad character range 7-3 at position 20
     Started: 14:28:26.927898
    Duration: 6321.149 ms
     Changes:
```

* Use single-quoting

Signed-off-by: Mark Gomersbach <markgomersbach@gmail.com>
2019-12-02 21:54:41 +00:00
bin ci: merge travis matrix, add salt-lint & rubocop to lint job 2019-10-09 16:09:06 +01:00
docs docs(contributing): remove to use org-level file instead [skip ci] 2019-10-14 12:29:36 +01:00
php fix(map.jinja): fix useflags regex (gentoo) 2019-12-02 21:54:41 +00:00
test ci(platform): add arch-base-latest (commented out for now) [skip ci] 2019-10-01 16:20:45 +01:00
.gitignore chore: use semantic-release cross-formula standard structure 2019-07-19 17:16:12 +01:00
.rubocop.yml ci: merge travis matrix, add salt-lint & rubocop to lint job 2019-10-09 16:09:06 +01:00
.salt-lint ci(travis): update salt-lint config for v0.0.10 [skip ci] 2019-10-23 17:34:21 +01:00
.travis.yml ci(travis): quote pathspecs used with git ls-files [skip ci] 2019-11-27 21:54:53 +00:00
.yamllint ci: merge travis matrix, add salt-lint & rubocop to lint job 2019-10-09 16:09:06 +01:00
AUTHORS.md chore(release): 1.2.2 [skip ci] 2019-10-10 03:15:10 +00:00
CHANGELOG.md chore(release): 1.2.2 [skip ci] 2019-10-10 03:15:10 +00:00
commitlint.config.js feat(semantic-release): add support of semantic-release 2019-06-27 00:02:46 +02:00
FORMULA chore(release): 1.2.2 [skip ci] 2019-10-10 03:15:10 +00:00
Gemfile ci: merge travis matrix, add salt-lint & rubocop to lint job 2019-10-09 16:09:06 +01:00
kitchen.yml ci(kitchen): use develop image until master is ready (amazonlinux) [skip ci] 2019-11-03 11:35:58 +00:00
LICENSE Add LICENSE. 2013-07-27 20:36:26 +02:00
pillar.example fix(pillar.example): fix yamllint error 2019-10-07 19:15:57 +01:00
pre-commit_semantic-release.sh ci(travis): run shellcheck during lint job [skip ci] 2019-11-27 20:54:36 +00:00
release-rules.js feat(semantic-release): add support of semantic-release 2019-06-27 00:02:46 +02:00
release.config.js fix(release.config.js): use full commit hash in commit link [skip ci] 2019-10-31 10:30:04 +00:00

php-formula

Travis CI Build Status Semantic Release

Formula to set up and configure php

WARNING: BREAKING CHANGES SINCE v1.0.0

Prior to v1.0.0, this formula provided two methods for managing PHP; the old method under php and the new method under php.ng. The old method has now been removed and php.ng has been promoted to be php in its place.

If you are not in a position to migrate, please pin your repo to the final release tag before v1.0.0, i.e. v0.40.1.

To migrate from php.ng, simply modify your pillar to promote the entire section under php:ng so that it is under php instead. So with the editor of your choice, highlight the entire section and then unindent one level. Finish by removing the ng: line.

To migrate from the old php, first convert to php.ng under v0.40.1. and then follow the steps laid out in the paragraph directly above.

Table of Contents

General notes

See the full SaltStack Formulas installation and usage instructions.

If you are interested in writing or contributing to formulas, please pay attention to the Writing Formula Section.

If you want to use this formula, please pay attention to the FORMULA file and/or git tag, which contains the currently released version. This formula is versioned according to Semantic Versioning.

See Formula Versioning Section for more details.

Contributing to this repo

Commit message formatting is significant!!

Please see How to contribute for more details.

Available states

Please provide feedback by filing issues, discussing in #salt in Freenode and the mailing list as normal.

Note: php states require the merge parameter of salt.modules.pillar.get(), first available in the Helium release.

php

Installs the php package.

php.adodb

Installs the php-adodb package.

php.apache2

Meta-state that combines php.apache2.install and php.apache2.ini.

php.apache2.ini

Manages the apache2 php.ini file

php.apache2.install

Installs the apache2 and libapache2-mod-php5 package. Debian Only.

php.apc

Installs the php-apc package. Disabled on opensuse need server:php repo

php.apcu

Installs the php-apcu package. Disabled on opensuse need server:php repo

php.auth-sasl

Installs the php-auth-sasl package.

php.bcmath

Installs the php-bcmath package.

php.bz2

Installs the php-bz2 package.

php.cache-lite

Installs the php-cache-lite package.

php.cgi

Installs the php-cgi package. Disabled on opensuse only php5-fastcgi available.

php.cli

Meta-state that combines php.cli.install and php.cli.ini.

php.cli.ini

Manages the php-cli ini file.

php.cli.install

Installs the php-cli package.

php.composer

Installs [composer](https://getcomposer.org) and keeps it updated.

php.console-table

Installs the php-console-table package.

php.ctype

Installs the php-ctype package.

php.curl

Installs the php5-curl package on Debian, and ensures that curl itself is installed for RedHat systems, this is due to the curl libs being provided by php-common, which will get installed with the main php package.

php.dba

Installs the php-dba package.

php.dev

Installs the php5-dev and build-essential package.

php.filter

Installs the php-filter package.

php.fpm

Meta-state that combines all php.fpm states.

php.fpm.config

Manages the (non-pool) php-fpm config files.

php.fpm.install

Installs the php-fpm package.

php.fpm.pools

Meta-state that combines php.fpm.service and php.fpm.pools_config

php.fpm.pools_config

Manages php-fpm pool config files.

php.fpm.service

Manages the php-fpm service.

php.gd

Installs the php-gd package.

php.gearman

Installs the php-gearman package.

php.geoip

Installs the php-geoip package.

php.geshi

Installs the php-geshi package.

php.gettext

Installs the php-gettext package.

php.gmp

Installs the php-gmp package. Debian Only.

php.hash

Installs the php-hash package.

php.http

Installs the php-http package.

php.hhvm

Meta-state that combines php.hhvm states

php.hhvm.config

Manages the php-hhvm config files

php.hhvm.install

Installs the php-hhvm package

php.hhvm.repo ^^^^^^^^^.REPO^^^^^^

Configures the hhvm repo for debian/ubuntu

php.hhvm.service

Manages the php-hhvm service.

php.igbinary

Installs the php-igbinary package.

php.imagick

Installs the php-imagick package. Disabled on opensuse no package.

php.imap

Installs the php-imap package.

php.intl

Installs the php-intl package.

php.json

Installs the php-json package.

php.ldap

Installs the php-ldap package.

php.mail

Installs the php-mail package.

php.mbstring

Installs the php-mbstring package.

php.mcrypt

Installs the php-mcrypt package.

php.mdb2

Installs the php-mdb2 package.

php.mdb2-driver-mysql

Installs the php-mdb2-driver-mysql package.

php.mdb2-driver-pgsql

Installs the php-mdb2-driver-pgsql package.

php.memcache

Installs the php-memcache package. Disabled on opensuse need server:php:extensions repo

php.memcached

Installs the php-memcached package. Disabled on opensuse need server:php:extensions repo

php.modules

Calls php.<name> for each entry in php:modules if available, or try to install the matching packages that can be set via from php:lookup:pkgs

php.mongo

Installs the php-mongo package.

php.mongodb

Installs the php-mongodb package.

php.msgpack

Installs the php-msgpack package.

php.mysql

Installs the php-mysql package.

php.mysqlnd

Installs the php-mysqlnd package. Disabled on opensuse no package.

php.net-smtp

Installs the php-net-smtp package.

php.net4

Installs the php-net4 package.

php.net6 ^^^^^^^^^^^NET6

Installs the php-net6 package.

php.oauth

Installs the php-oauth package.

php.opcache

Installs the php-opcache package.

php.openssl

Installs the php-openssl package.

php.pear

Installs the php-pear package.

php.pgsql

Installs the php-pgsql package.

php.phar

Installs the php-phar package.

php.posix

Installs the php-posix package.

php.pspell

Installs the php-pspell package.

php.readline

Installs the php-readline package.

php.redis

Installs the php-redis package. Disabled on opensuse need server:php:extensions repo

php.seclib

Installs the php-seclib package.

php.session

Installs the php-session package.

php.snmp

Installs the php-snmp package.

php.soap

Installs the php-soap package.

php.sqlite

Installs the php-sqlite package,

php.ssh2

Installs the php-ssh2 package,

php.suhosin

Installs the php-suhosin package.

php.svn

Installs the php-svn package.

php.sybase

Installs the php-sybase package.

php.tcpdf

Installs the php-tcpdf package.

php.tidy

Installs the php-tidy package.

php.uuid

Installs the php-uuid package.

php.xcache

Meta-state that combines php.xcache.install and php.xcache.ini.

php.xcache.ini

Manages the php-xcache ini file

php.xcache.install

Installs the php-xcache package. Disabled on opensuse need server:php:extensions repo

php.xdebug

Installs the php-xdebug package.

php.xml

Installs the php-xml package.

php.xsl

Installs the php-xsl package.

php.zip

Installs the php-zip package.

Testing

Linux testing is done with kitchen-salt.

Requirements

  • Ruby
  • Docker
$ gem install bundler
$ bundle install
$ bin/kitchen test [platform]

Where [platform] is the platform name defined in kitchen.yml, e.g. debian-9-2019-2-py3.

bin/kitchen converge

Creates the docker instance and runs the template main state, ready for testing.

bin/kitchen verify

Runs the inspec tests on the actual instance.

bin/kitchen destroy

Removes the docker instance.

bin/kitchen test

Runs all of the stages above in one go: i.e. destroy + converge + verify + destroy.

bin/kitchen login

Gives you SSH access to the instance for manual testing.