cookbook

systemctl error in docker 'Failed to connect to bus: No such file or directory'

混江龙づ霸主 提交于 2020-12-31 13:59:06
问题 I am using Ubuntu-16.04 image with docker to test my cookbook in local. While doing kitchen converge , I am getting the following error. I figured out systemctl is not working properly. Can someone please help me to fix this problem OR any other way to achieve the same thing? [2017-11-30T15:22:30+00:00] INFO: Running queued delayed notifications before re-raising exception Running handlers: [2017-11-30T15:22:30+00:00] ERROR: Running exception handlers Running handlers complete [2017-11-30T15

Unable to find Cookbooks in local-mode with chef-client

痞子三分冷 提交于 2020-05-27 05:26:39
问题 I am new to Chef and following a tutorial which is providing information on running a default recipe inside a cookbook or a specific recipe. The tree output for my Cookbook is as follows: pwd /opt/dk-chef/python_code/Chef [root@LUMOS Chef]# tree Cookbooks/BasicLinux/ Cookbooks/BasicLinux/ ├── Berksfile ├── chefignore ├── LICENSE ├── metadata.rb ├── nodes │ └── LUMOS.RMT.com.json ├── README.md ├── recipes │ ├── default.rb │ ├── nodes │ │ └── LUMOS.RMT.com.json │ └── setup.rb ├── spec │ ├──

Mule Cookbook Anypoint connector - build failed

前提是你 提交于 2020-01-17 03:12:10
问题 pull this from this directory and perform a maven build git clone https://github.com/mulesoft/mule-cookbook.git The following is the error received towards the 2nd last step [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce (default-enforce) on project cookbook-connector: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message: [ERROR] Detected JDK Version: 1.8.0-77 is not in the allowed range [1.7,1.8). I have tried to change POM.xml

Mule Cookbook Anypoint connector - build failed

牧云@^-^@ 提交于 2020-01-17 03:12:05
问题 pull this from this directory and perform a maven build git clone https://github.com/mulesoft/mule-cookbook.git The following is the error received towards the 2nd last step [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce (default-enforce) on project cookbook-connector: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message: [ERROR] Detected JDK Version: 1.8.0-77 is not in the allowed range [1.7,1.8). I have tried to change POM.xml

How to update the file with multiple lines without deleting the contents of the original file using chef recipe

▼魔方 西西 提交于 2019-12-25 03:57:25
问题 I would like to append my file /var/rsyslog.conf file with the following lines without having to delete my existing file. Lines to include in the file are ************* #audit log $ModLoad imfile $InputFileName /var/log/audit/audit.log $InputFileTag tag_audit_log: $InputFileStateFile audit_log $InputFileSeverity info $InputFileFacility local6 $InputRunFileMonitor *.* @@172.167.189.67:514 ************* In the recipe I gave the following as a file resourse **** file '/etc/rsyslog.conf' do

Chef: private supermarket cookbook directly on server

十年热恋 提交于 2019-12-25 01:43:34
问题 I have a cookbook which is available on a private chef supermarket and I have 4 chef servers which need this cookbook to be available so that corresponding nodes can consume it. We can use berks install and berks upload multiple times to achieve this. Is there a simpler way to do this? If it is not possible, why does chef not allow this? 回答1: if you have 4 different chef servers, then i assume that you are using 4 different keys for authentication when you interact with the chef server. this

chef rewind cookbook_file definition from a wrapper cookbook recipe

安稳与你 提交于 2019-12-22 01:32:26
问题 I am using an cookbook github.com opscode-cookbooks/openldap. I wrote an wrapper cookbook "lab_openldap" that includes "openldap::server" recipe. The server.rb recipe uses following clausule to upload the PEM file from cookbooks files/ssl/*.pem to server to the location node['openldap']['ssl_cert']. if node['openldap']['tls_enabled'] && node['openldap']['manage_ssl'] cookbook_file node['openldap']['ssl_cert'] do source "ssl/#{node['openldap']['server']}.pem" mode 00644 owner "root" group

chef cookbook fails on ohai undefined method `[]' for nil:NilClass

倖福魔咒の 提交于 2019-12-19 08:05:14
问题 I'm working on a chef cookbook to set up a vanilla ubuntu 12.04.2 with nginx postgresql and unicorn on my vagrant box, but I'm getting into troubles with nginx, there's an exception undefined method `[]' for nil:NilClass when installing it that seem to relate to ohai configuration. I've posted all I have here: https://github.com/DonGiulio/mychef here's the output from chef-solo: Starting Chef Client, version 11.4.0 Compiling Cookbooks... =======================================================

chef cookbook fails on ohai undefined method `[]' for nil:NilClass

妖精的绣舞 提交于 2019-12-19 08:05:11
问题 I'm working on a chef cookbook to set up a vanilla ubuntu 12.04.2 with nginx postgresql and unicorn on my vagrant box, but I'm getting into troubles with nginx, there's an exception undefined method `[]' for nil:NilClass when installing it that seem to relate to ohai configuration. I've posted all I have here: https://github.com/DonGiulio/mychef here's the output from chef-solo: Starting Chef Client, version 11.4.0 Compiling Cookbooks... =======================================================

how to require my library in chef ruby_block

一笑奈何 提交于 2019-12-18 14:40:24
问题 I'm developing a cookbook to deploy a simple ROR application. I write an app_helper.rb and put it into the libraries directory of my cookbook, here is the content: module AppHelper def self.find_gem if File.exists?("/usr/local/rvm/bin/rvm") return `/usr/local/rvm/bin/rvm default exec which gem`.chomp else return "/usr/bin/gem" end end end In the recipes/default.rb, I mix in the above module into Chef::Recipe class class Chef::Recipe include AppHelper end As you know, the find_gem function can