Puppet class inheritance confusion - Server Fault
http://serverfault.com/questions/197909/puppet-class-inheritance-confusion
The difference between import and include statemens is:
import works with files, and does not execute classes
include executes classes
files must be imported before the classes can be included
Note: there is a very strong exception to the last rule: Puppet module lookup. include statement does automatic imports in many situations. Here are some of them:
公告版位
目前分類:linux (29)
- Dec 11 Tue 2012 17:29
[puppet]puppet import include
- Dec 10 Mon 2012 11:06
[puppet]puppet plusignment "+>"
There are other ways to use inheritance. In Puppet 0.23.1 and higher, it’s possible to add values to resource parameters using the ‘+>’ (‘plusignment’) operator:
class apache {
service { 'apache': require => Package['httpd'] }
}
class apache-ssl inherits apache {
# host certificate is required for SSL to function
Service['apache'] { require +> File['apache.pem'] }
- Dec 10 Mon 2012 10:55
[puppet]puppet note :: The double colon that divides the sections of a class’s name is called the namespace separator.
[puppet]
puppet note "::"
The double colon that divides the sections of a class’s name is called the namespace separator.
Module Fundamentals — Documentation — Puppet Labs
http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html
- Nov 26 Mon 2012 10:11
[rvm] install ruby rvm
#curl -L https://get.rvm.io | bash -s stable --ruby
Installation of RVM in /usr/local/rvm/ is almost complete:
* First you need to add all users that will be using rvm to 'rvm' group,
and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`.
* To start using RVM you need to run `source /etc/profile.d/rvm.sh`
in all your open shell windows, in rare cases you need to reopen all shell windows.
- Nov 22 Thu 2012 11:28
[redis]#error "Newer version of jemalloc required" make error
[root@hct5 redis-2.6.4]# make
cd src && make all
make[1]: Entering directory `/root/logenv/redis-2.6.4/src'
CC adlist.o
在包含自 adlist.c:34 的檔案中:
zmalloc.h:50:31: 錯誤:jemalloc/jemalloc.h:沒有此一檔案或目錄
zmalloc.h:55:2: 錯誤:#error "Newer version of jemalloc required"
make[1]: *** [adlist.o] Error 1
make[1]: Leaving directory `/root/logenv/redis-2.6.4/src'
make: *** [all] Error 2
- Nov 22 Thu 2012 10:36
[linux]usermod set home dir
usermod -d /path/to/new/homedir/ username
- Nov 19 Mon 2012 16:21
[ruby][cent os]bundle install error /usr/bin/ruby extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h
cent os
centos
/usr/bin/ruby extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h
yum install ruby-devel
- Nov 19 Mon 2012 11:05
[linux] gnome-ssh-askpass git Gtk-WARNING
[peicheng@searcher1 logcentral]$ git push -u origin master
(gnome-ssh-askpass:15555): Gtk-WARNING **: cannot open display:
sol:
$ unset SSH_ASKPASS
- Nov 15 Thu 2012 11:45
[centos]which: no tclsh8.5 redis
make[1]: Entering directory `/redis/redis-2.4.7/src'
which: no tclsh8.5 in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
You need 'tclsh8.5' in order to run the Redis test