Closed Rarian closed 7 years ago
I'm experiencing this issue as well, below is the output from running kitchen verify
:
================================================================================
Recipe Compile Error in /tmp/kitchen/cache/cookbooks/php-fpm/attributes/default.rb
================================================================================
NoMethodError
-------------
undefined method `platform_version' for #<Chef::Node::Attribute:0x00000004c830d0>
Cookbook Trace:
---------------
/tmp/kitchen/cache/cookbooks/php-fpm/attributes/default.rb:13:in `from_file'
Relevant File Content:
----------------------
/tmp/kitchen/cache/cookbooks/php-fpm/attributes/default.rb:
6: pool_conf_dir = "/etc/php-fpm.d"
7: conf_file = "/etc/php-fpm.conf"
8: error_log = "/var/log/php-fpm/error.log"
9: pid = "/var/run/php-fpm/php-fpm.pid"
10: else
11: user = "www-data"
12: group = "www-data"
13>> if platform?('ubuntu') and node.platform_version.to_f >= 16.04
14: php_conf_dir = "/etc/php/7.0"
15: php_fpm_name = "php7.0-fpm"
16: else
17: php_conf_dir = "/etc/php5"
18: php_fpm_name = "php5-fpm"
19: end
20: conf_dir = "#{php_conf_dir}/fpm/conf.d"
21: pool_conf_dir = "#{php_conf_dir}/fpm/pool.d"
22: if node.platform == "ubuntu" and node.platform_version.to_f <= 10.04
Yes, please merge the pull request that fixes this: https://github.com/yevgenko/cookbook-php-fpm/pull/98
resolved with #98 in v0.7.9 release
Currently this cookbook uses the old method access for node attributes in five locations, this syntax has been removed in favour of the new bracket syntax in Chef 13.