Giter Club home page Giter Club logo

postfixadmin-cookbook's Issues

Breaks with apache2 v3.2.2

In apache2 3.2.2 apache.listen_ports and apache.listen_addresses are depreciated and this cookbook fails to run.
https://github.com/sous-chefs/apache2/blob/master/CHANGELOG.md

Quick Hack in apache2 recipe almost fixes the problem:

 def update_listen_ports(port)                              
-  return if node['apache']['listen_ports'].include?(port)  
-  node.set['apache']['listen_ports'] =                     
-    node['apache']['listen_ports'] + [port]                
+  return if node['apache']['listen'].include?( "*:#{port}")
+  node.default['apache']['listen'] =                       
+    node['apache']['listen'] + ["*:#{port}"]               
 end                                                        

I also had to manually edit the node to delete the listen_ports previously set by postfixadmin cookbook.

Missing name in package declaration (pkg_php_mbstring)

Hi,

I want to set up Postfix & Dovecot in a Vagrant VM using chef-solo. The VM is based on an Ubuntu 12.04 image with the Chef Omnibus 11.10.4 package installed.

However, when I provision the VM, Chef fails with the following error:

cludwig$ vagrant provision
[default] Chef 11.10.4 Omnibus package is already installed.
[default] Running provisioner: chef_solo...
Generating chef JSON and uploading...
Running chef-solo...
stdin: is not a tty
[2014-03-09T15:18:51+01:00] INFO: Forking chef instance to converge...
[2014-03-09T15:18:51+01:00] INFO: *** Chef 11.10.4 ***                                                                                                                                                                                       
[2014-03-09T15:18:51+01:00] INFO: Chef-client pid: 1793                                                                                                                                                                                      
[2014-03-09T15:18:52+01:00] INFO: Setting the run_list to ["recipe[bullinger::default]"] from JSON                                                                                                                                           
[2014-03-09T15:18:52+01:00] INFO: Run List is [recipe[bullinger::default]]                                                                                                                                                                   
[2014-03-09T15:18:52+01:00] INFO: Run List expands to [bullinger::default]                                                                                                                                                                   
[2014-03-09T15:18:52+01:00] INFO: Starting Chef Run for precise32                                                                                                                                                                            
[2014-03-09T15:18:52+01:00] INFO: Running start handlers                                                                                                                                                                                     
[2014-03-09T15:18:52+01:00] INFO: Start handlers complete.                                                                                                                                                                                   
[2014-03-09T15:18:54+01:00] INFO: Missing gem 'sequel'                                                                                                                                                                                       
[2014-03-09T15:18:55+01:00] WARN: Cloning resource attributes for package[postfix] from prior resource (CHEF-3694)                                                                                                                           
[2014-03-09T15:18:55+01:00] WARN: Previous package[postfix]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfix-dovecot/recipes/postfix-full.rb:20:in `from_file'                                                                             
[2014-03-09T15:18:55+01:00] WARN: Current  package[postfix]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfix-full/recipes/default.rb:22:in `from_file'                                                                                     
[2014-03-09T15:18:55+01:00] WARN: Cloning resource attributes for service[postfix] from prior resource (CHEF-3694)                                                                                                                           
[2014-03-09T15:18:55+01:00] WARN: Previous service[postfix]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfix-full/recipes/default.rb:24:in `from_file'                                                                                     
[2014-03-09T15:18:55+01:00] WARN: Current  service[postfix]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfix-full/recipes/default.rb:74:in `from_file'                                                                                     
[2014-03-09T15:18:55+01:00] WARN: Cloning resource attributes for service[apache2] from prior resource (CHEF-3694)                                                                                                                           
[2014-03-09T15:18:55+01:00] WARN: Previous service[apache2]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apache2/recipes/default.rb:24:in `from_file'                                                                                          
[2014-03-09T15:18:55+01:00] WARN: Current  service[apache2]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apache2/recipes/default.rb:210:in `from_file'                                                                                         
[2014-03-09T15:18:56+01:00] WARN: Cloning resource attributes for directory[/var/cache/local/preseeding] from prior resource (CHEF-3694)                                                                                                     
[2014-03-09T15:18:56+01:00] WARN: Previous directory[/var/cache/local/preseeding]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apt/recipes/default.rb:75:in `block in from_file'                                                               
[2014-03-09T15:18:56+01:00] WARN: Current  directory[/var/cache/local/preseeding]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql/recipes/_server_debian.rb:4:in `from_file'                                                                
[2014-03-09T15:18:56+01:00] WARN: Cloning resource attributes for directory[/var/lib/mysql] from prior resource (CHEF-3694)                                                                                                                  
[2014-03-09T15:18:56+01:00] WARN: Previous directory[/var/lib/mysql]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql/recipes/_server_debian.rb:34:in `block in from_file'                                                                   
[2014-03-09T15:18:56+01:00] WARN: Current  directory[/var/lib/mysql]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql/recipes/_server_debian.rb:78:in `from_file'

================================================================================
Recipe Compile Error in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/bullinger/recipes/default.rb
================================================================================


ArgumentError
-------------
You must supply a name when declaring a package resource


Cookbook Trace:
---------------
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfixadmin/recipes/default.rb:60:in `from_file'
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfix-dovecot/recipes/postfixadmin.rb:22:in `from_file'
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfix-dovecot/recipes/default.rb:23:in `from_file'
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/bullinger/recipes/_postfix-dovecot.rb:24:in `from_file'
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/bullinger/recipes/default.rb:16:in `from_file'


Relevant File Content:
----------------------
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfixadmin/recipes/default.rb:

 53:    action :install
 54:  end
 55:  
 56:  package pkg_php_imap do
 57:    action :install
 58:  end
 59:  
 60>> package pkg_php_mbstring do
 61:    not_if do pkg_php_mbstring.nil? end
 62:    action :install
 63:  end
 64:  
 65:  chef_gem 'sequel'
 66:  
 67:  mysql_connection_info = {
 68:    :host => node['postfixadmin']['database']['host'],
 69:    :username => 'root',



[2014-03-09T15:18:56+01:00] ERROR: Running exception handlers
[2014-03-09T15:18:56+01:00] ERROR: Exception handlers complete
[2014-03-09T15:18:56+01:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2014-03-09T15:18:56+01:00] ERROR: You must supply a name when declaring a package resource
[2014-03-09T15:18:56+01:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

Looking at the default postfixadmin recipe, I see pkg_php_mbstring is assigned nil on an Ubuntu system; the guard in line 61 seems to come too late, though.

Regards
Christoph

Add update to some LWRP - Feature Request

I see that adding remove to some of the LWRPs is on the todo list.

Supporting update, IMHO, would be more useful than remove.

Updating goto on aliases
Updating passwords on admins and mailboxes
Updating active status on aliases, admins, domains and mailboxes

Can't run recipe because fails on postfixadmin/recipes/apache.rb

Chef complains about

27>>   return if node['apache']['listen_ports'].include?(port)

ERROR: undefined method `include?' for nil:NilClass

I'm running the recipe included by postfix-dovecot cookbook and postfix-dovecot is included in another custom cookbook.

postfixadmin_admin does not seem to work properly

If the admin being created does not exist and encrypted attributes are enabled an exception is thrown.

In the admin LWRP the definition of password seems incorrect.

# providers/admin.rb
def password
  if encrypted_attributes_enabled?
    Chef::EncryptedAttribute.load(new_resource.password)
  else
    new_resource.password
  end
end

The resource only allows a string yet the code wants different data depending on if encrypted attributes are enabled or not.

I think the check for encrypted attributes is not needed here, it should simply be:

def password
  new_resource.password
end

Make cookbook compatible with Chef 13

Cookbook Version

3.0.0

Chef Client Version

13

Platform Details

CentOS7

Scenario

Running this cookbook with Chef 13

Steps to Reproduce

Run the cookbook with Chef 13

Expected Result

Cookbook executed successfully.

Actual Result

Failing because mysql2_chef_gem ~> 1.0 is not compatible with Chef 13

Incompatible with 11.8.0

libraries / api.rb requires a chef file that no longer exists as of 11.8.0:
requires 'chef/rest/rest_request'

https://github.com/opscode/chef/tree/11.8.0/lib/chef

When running the cookbook under the latest chef, it produces the following error:

[2013-11-17T02:40:39+00:00] ERROR: Running exception handlers
[2013-11-17T02:40:39+00:00] ERROR: Exception handlers complete
[2013-11-17T02:40:39+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2013-11-17T02:40:39+00:00] ERROR: cannot load such file -- chef/rest/rest_request

================================================================================
Recipe Compile Error in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfixadmin/libraries/api.rb
================================================================================


LoadError
---------
cannot load such file -- chef/rest/rest_request                                                                                                                                                      [11/893]


Cookbook Trace:
---------------
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfixadmin/libraries/api.rb:4:in `<top (required)>'


Relevant File Content:
----------------------
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/postfixadmin/libraries/api.rb:

  1:  
  2:  require 'uri'
  3:  require 'net/http'
  4>> require 'chef/rest/rest_request'
  5:  
  6:  module PostfixAdmin
  7:    module API
  8:      @@cookie = nil
  9:      @@authenticated = false
 10:  
 11:      def self.request(method, path, body, ssl=false)
 12:        proto = ssl ? 'https' : 'http'
 13:        port = ssl ? 443 : 80

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.