Advertisement
Guest User

Database users && info

a guest
Jan 19th, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 54.86 KB | None | 0 0
  1. ./M0m0x01d
  2. ------------------------------------------------------------
  3. http://gitlab.smile.ci/
  4. ------------------------------------------------------------
  5. http://gitlab.smile.ci/dev/puppetmodules/commit/819b3a2b8355a01ede0998c730b267e2d7355c35.diff
  6. ------------------------------------------------------------
  7. diff --git a/hiera/common.yaml b/hiera/common.yaml
  8. index a7996a2..2a7e244 100644
  9. --- a/hiera/common.yaml
  10. +++ b/hiera/common.yaml
  11. @@ -6,7 +6,7 @@ basics_modules:
  12. - mcollective::agent
  13.  
  14. base:
  15. - root_password:
  16. + root_password: 6d96270004515a0486bb7f76196a72b40c55a47f
  17. admins_group: adminsys
  18. dns:
  19. search: smileci.lan
  20. @@ -77,12 +77,53 @@ openssh_ldap:
  21. adminpw: smileci
  22.  
  23. pam_ldap:
  24. - config_params:
  25. - uri: ldap://
  26. - server: ldap1.smileci.lan
  27. + settings:
  28. + server: ldap://10.100.0.20
  29. domain: dc=smileci,dc=lan
  30. - service: nslcd
  31.  
  32.  
  33. module:
  34. - "openssh_lpk"
  35. +
  36. +phpmyadmin:
  37. + servers:
  38. + admin:
  39. + secret: 'uZ|9l1dPVkEYwcmL0xlNYn+wr^@c0_3wG2xDv0urqF%'
  40. + auth_type: cookie
  41. + dbuser: pdns
  42. + dbpass: smilecidns
  43. + dbname: pdns
  44. + dbserver: 10.100.13.21
  45. + dbport: 3306
  46. + dbtype: mysql
  47. + # Access list
  48. + #acl: 192.168.1.0/24
  49. + acl: All
  50. +
  51. +#proftpd common variables
  52. +proftpd:
  53. + settings:
  54. + port: 21
  55. + # pam off or on
  56. + pam_authentication: Off
  57. + motd: "welcome %{::hostname} sftp server "
  58. + server_admin: smile@smile.ci
  59. + timeout_idle: 1200
  60. + enable_ftp: FALSE
  61. + enable_sftp: TRUE
  62. + user: proftpd
  63. + group: nobody
  64. + # sftp virtual hosts
  65. + sftp:
  66. + public:
  67. + motd: "Welcome %{::hostname} sftp server"
  68. + vhost_name: public
  69. + port: 22
  70. + ipaddress: 0.0.0.0
  71. + timeout_idle: 1200
  72. + authentication_methods: password publickey keyboard-interactive
  73. + max_login_attempts: 3
  74. + authorized_keys: file:~/.sftp/authorized_keys
  75. + umask: 066 022
  76. + max_clients: 100
  77. + server_admin: smile@smile.ci
  78. diff --git a/hiera/fqdn/foreman.smileci.lan.yaml b/hiera/fqdn/foreman.smileci.lan.yaml
  79. new file mode 100644
  80. index 0000000..0c35b31
  81. --- /dev/null
  82. +++ b/hiera/fqdn/foreman.smileci.lan.yaml
  83. @@ -0,0 +1,6 @@
  84. +
  85. +users:
  86. + jean:
  87. + name: jean
  88. + homedir: /home/jean
  89. + shell: sh
  90. diff --git a/hiera/os/Debian.yaml b/hiera/os/Debian.yaml
  91. index ff9fb62..2beb5a8 100644
  92. --- a/hiera/os/Debian.yaml
  93. +++ b/hiera/os/Debian.yaml
  94. @@ -44,3 +44,8 @@ mysql:
  95. dependencies:
  96. - 'mysql'
  97. - 'mysql-server'
  98. +
  99. +phpmyadmin:
  100. + httpd_config: /etc/apache2/conf.d/phpmyadmin.conf
  101. + # web server
  102. + web_server: apache2
  103. diff --git a/hiera/os/RedHat.yaml b/hiera/os/RedHat.yaml
  104. index eade1a6..7c9ad57 100644
  105. --- a/hiera/os/RedHat.yaml
  106. +++ b/hiera/os/RedHat.yaml
  107. @@ -43,3 +43,8 @@ mysql:
  108. dependencies:
  109. - 'mysql'
  110. - 'mysql-server'
  111. +
  112. +phpmyadmin:
  113. + httpd_config: '/etc/httpd/conf.d/phpMyAdmin.conf'
  114. + # web server
  115. + web_server: httpd
  116. diff --git a/modules/hiera.yaml b/modules/hiera.yaml
  117. deleted file mode 100644
  118. index ae9663f..0000000
  119. --- a/modules/hiera.yaml
  120. +++ /dev/null
  121. @@ -1,8 +0,0 @@
  122. -
  123. -:backends:
  124. - - yaml
  125. -:yaml:
  126. - :datadir: /etc/puppet/hiera/
  127. -:hierarchy:
  128. - - "%{osfamily}"
  129. - - common
  130. diff --git a/modules/hiera.yaml~ b/modules/hiera.yaml~
  131. deleted file mode 100644
  132. index 8c68468..0000000
  133. --- a/modules/hiera.yaml~
  134. +++ /dev/null
  135. @@ -1,9 +0,0 @@
  136. -
  137. -:backends:
  138. - - yaml
  139. -:yaml:
  140. - :datadir: /etc/puppet/hiera/
  141. -:hierarchy:
  142. - - "%{fdqn}"
  143. - - "%{osfamily}"
  144. - - common
  145. diff --git a/modules/hiera/Debian.yaml b/modules/hiera/Debian.yaml
  146. deleted file mode 100644
  147. index e69de29..0000000
  148. diff --git a/modules/hiera/Debian.yaml~ b/modules/hiera/Debian.yaml~
  149. deleted file mode 100644
  150. index 40424a1..0000000
  151. --- a/modules/hiera/Debian.yaml~
  152. +++ /dev/null
  153. @@ -1,6 +0,0 @@
  154. -
  155. -phpmyadmin:
  156. - # web server config
  157. - httpd_config: /etc/phpmyadmin/apache.conf
  158. - web_server: apache2
  159. -
  160. diff --git a/modules/hiera/RedHat.yaml b/modules/hiera/RedHat.yaml
  161. deleted file mode 100644
  162. index e69de29..0000000
  163. diff --git a/modules/hiera/RedHat.yaml~ b/modules/hiera/RedHat.yaml~
  164. deleted file mode 100644
  165. index 69f67e1..0000000
  166. --- a/modules/hiera/RedHat.yaml~
  167. +++ /dev/null
  168. @@ -1,4 +0,0 @@
  169. -phpmyadmin:
  170. - # web server config
  171. - httpd_conf: /etc/phpMyAdmin/phpMyAdmin.conf
  172. - web_server: httpd
  173. diff --git a/modules/hiera/common.yaml b/modules/hiera/common.yaml
  174. deleted file mode 100644
  175. index 56cc19d..0000000
  176. --- a/modules/hiera/common.yaml
  177. +++ /dev/null
  178. @@ -1,53 +0,0 @@
  179. -#proftpd common variables
  180. -proftpd:
  181. - settings:
  182. - port: 21
  183. - # pam off or on
  184. - pam_authentication: Off
  185. - motd: "welcome %{::hostname} sftp server "
  186. - server_admin: smile@smile.ci
  187. - # users home dir
  188. - timeout_idle: 1200
  189. - # sftp virtual hosts
  190. - sftp:
  191. - public:
  192. - motd: "Welcome %{::hostname} sftp server "
  193. - vhost_name: public
  194. - # listen ip address
  195. - ipaddress: 192.168.1.5
  196. - port: 22
  197. - timeout_idle: 1200
  198. - authentication_methods: publickey keyboard-interactive
  199. - max_login_attempts: 3
  200. - authorized_keys: file:~/.sftp/authorized_keys
  201. - umask: 066 022
  202. - server_admin: smile@smile.ci
  203. - max_clients: 20
  204. - admin:
  205. - motd: "Welcome %{::hostname} sftp server"
  206. - vhost_name: admin
  207. - # listen ip address
  208. - ipaddress: 0.0.0.0
  209. - port: 22
  210. - authentication_methods: publickey keyboard-interactive
  211. - max_login_attempts: 3
  212. - umask: 066 022
  213. - timeout_idle: 1200
  214. - server_admin: smile@smile.ci
  215. - max_clients: 100
  216. - authorized_keys: file:~/.sftp/authorized_keys
  217. -
  218. -# phpmyadmin commmon variables
  219. -phpmyadmin:
  220. - settings:
  221. - # blowfish secret
  222. - secret: 'uZ|9l1dPVkEYwcmL0xlNYn+wr^@c0_3wG2xDv0urqF%'
  223. - dbuser: root
  224. - dbpass: smile
  225. - dbname: mysql
  226. - dbserver: localhost
  227. - dbport: 3306
  228. - AllowRoot: FALSE
  229. - dbtype: mysql
  230. - auth_type: cookie
  231. -
  232. diff --git a/modules/hiera/common.yaml~ b/modules/hiera/common.yaml~
  233. deleted file mode 100644
  234. index 4fd3dcf..0000000
  235. --- a/modules/hiera/common.yaml~
  236. +++ /dev/null
  237. @@ -1,52 +0,0 @@
  238. -#proftpd common variables
  239. -proftpd:
  240. - settings:
  241. - port: 21
  242. - # pam off or on
  243. - pam_authentication: Off
  244. - motd: "welcome %{::hostname} sftp server "
  245. - server_admin: smile@smile.ci
  246. - # users home dir
  247. - timeout_idle: 1200
  248. - # sftp virtual hosts
  249. - sftp:
  250. - public:
  251. - motd: "Welcome %{::hostname} sftp server "
  252. - vhost_name: public
  253. - # listen ip address
  254. - ipaddress: 192.168.1.5
  255. - port: 22
  256. - timeout_idle: 1200
  257. - authentication_methods: publickey keyboard-interactive
  258. - max_login_attempts: 3
  259. - authorized_keys: file:~/.sftp/authorized_keys
  260. - umask: 066 022
  261. - server_admin: smile@smile.ci
  262. - max_clients: 20
  263. - admin:
  264. - motd: "Welcome %{::hostname} sftp server"
  265. - vhost_name: admin
  266. - # listen ip address
  267. - ipaddress: 0.0.0.0
  268. - port: 22
  269. - authentication_methods: publickey keyboard-interactive
  270. - max_login_attempts: 3
  271. - umask: 066 022
  272. - timeout_idle: 1200
  273. - server_admin: smile@smile.ci
  274. - max_clients: 100
  275. - authorized_keys: file:~/.sftp/authorized_keys
  276. -
  277. -# phpmyadmin commmon variables
  278. -phpmyadmin:
  279. - settings:
  280. - # blowfish secret
  281. - secret: 'uZ|9l1dPVkEYwcmL0xlNYn+wr^@c0_3wG2xDv0urqF%'
  282. - dbuser: root
  283. - dbpass: smile
  284. - dbname: mysql
  285. - dbserver: localhost
  286. - dbport: 3306
  287. - dbtype: mysql
  288. - auth_type: cookie
  289. -
  290. diff --git a/modules/openssh_ldap/manifests/init.pp b/modules/openssh_ldap/manifests/init.pp
  291. index 9551e90..71a2c66 100644
  292. --- a/modules/openssh_ldap/manifests/init.pp
  293. +++ b/modules/openssh_ldap/manifests/init.pp
  294. @@ -26,7 +26,7 @@ class openssh_ldap {
  295. ensure => latest
  296. }
  297.  
  298. - service { $service:
  299. + service { 'ssh':
  300. ensure => running,
  301. enable => true
  302. }
  303. diff --git a/modules/pam_ldap/manifests/init.pp b/modules/pam_ldap/manifests/init.pp
  304. index a275df4..a8a7375 100644
  305. --- a/modules/pam_ldap/manifests/init.pp
  306. +++ b/modules/pam_ldap/manifests/init.pp
  307. @@ -1,21 +1,16 @@
  308. # pam-ldap
  309. #
  310. -
  311. class pam_ldap {
  312. -
  313. $pam_ldap = hiera_hash('pam_ldap')
  314. $dependencies = $pam_ldap['dependencies']
  315. - $service = $pam_ldap['service']
  316. - $config_file = $pam_ldap['config_file']
  317. - $config_template= $pam_ldap['config_template']
  318. - $config_params = $pam_ldap['config_params']
  319. + $settings = $pam_ldap['settings']
  320.  
  321. #instal dep
  322. package { $dependencies :
  323. ensure => installed
  324. }
  325.  
  326. - service { $service:
  327. + service { ['nslcd', 'nscd']:
  328. ensure => running,
  329. enable => true,
  330. require => Package[$dependencies]
  331. @@ -25,18 +20,22 @@ class pam_ldap {
  332. File {
  333. owner => nslcd,
  334. group => nslcd,
  335. - mode => '0600',
  336. + mode => '0644',
  337. require => Package[$dependencies],
  338. }
  339. -
  340. +
  341. # nsswitch ldap
  342. file { '/etc/nsswitch.conf' :
  343. content => template('pam_ldap/nsswitch.conf.erb')
  344. }
  345.  
  346. - file { $config_file:
  347. - content => template($config_template),
  348. - notify => Service[$service]
  349. + file { '/etc/nscld.conf':
  350. + content => template('pam_ldap/nslcd.conf.erb'),
  351. + notify => Service['nslcd']
  352. }
  353.  
  354. + file { '/etc/nscd.conf' :
  355. + content => template('pam_ldap/nscd.conf.erb'),
  356. + notify => Service['nscd']
  357. + }
  358. }
  359. diff --git a/modules/pam_ldap/templates/nscd.conf.erb b/modules/pam_ldap/templates/nscd.conf.erb
  360. new file mode 100644
  361. index 0000000..0d9e0ee
  362. --- /dev/null
  363. +++ b/modules/pam_ldap/templates/nscd.conf.erb
  364. @@ -0,0 +1,43 @@
  365. +# THIS FILE IS MANAGED BY PUPPET
  366. +# DO NOT EDIT IT BY HAND
  367. +
  368. + debug-level 2
  369. + reload-count unlimited
  370. + paranoia no
  371. +# restart-interval 3600
  372. +
  373. + enable-cache passwd yes
  374. + positive-time-to-live passwd 36000
  375. + negative-time-to-live passwd 20
  376. + suggested-size passwd 211
  377. + check-files passwd yes
  378. + persistent passwd yes
  379. + shared passwd yes
  380. + max-db-size passwd 33554432
  381. + auto-propagate passwd yes
  382. +
  383. + enable-cache group yes
  384. + positive-time-to-live group 36000
  385. + negative-time-to-live group 60
  386. + check-files group yes
  387. + persistent group yes
  388. + shared group yes
  389. + auto-propagate group yes
  390. +
  391. + enable-cache hosts yes
  392. + positive-time-to-live hosts 3600
  393. + negative-time-to-live hosts 20
  394. + suggested-size hosts 211
  395. + check-files hosts yes
  396. + persistent hosts yes
  397. + shared hosts yes
  398. + max-db-size hosts 33554432
  399. +
  400. + enable-cache services yes
  401. + positive-time-to-live services 28800
  402. + negative-time-to-live services 20
  403. + suggested-size services 211
  404. + check-files services yes
  405. + persistent services yes
  406. + shared services yes
  407. + max-db-size services 33554432
  408. diff --git a/modules/pam_ldap/templates/nslcd.conf.erb b/modules/pam_ldap/templates/nslcd.conf.erb
  409. index d69181c..67b9346 100644
  410. --- a/modules/pam_ldap/templates/nslcd.conf.erb
  411. +++ b/modules/pam_ldap/templates/nslcd.conf.erb
  412. @@ -3,10 +3,10 @@ uid nslcd
  413. gid nslcd
  414.  
  415. # The location at which the LDAP server(s) should be reachable.
  416. -uri <%= @config_params['uri'] %><%= @config_params['server'] %>
  417. +uri <%= @settings['server'] %>
  418.  
  419. # The search base that will be used for all queries.
  420. -base <%= @config_params['domain'] %>
  421. +base <%= @settings['domain'] %>
  422.  
  423. # The LDAP protocol version to use.
  424. #ldap_version 3
  425. diff --git a/modules/phpmyadmin/manifests/.init.pp.swp b/modules/phpmyadmin/manifests/.init.pp.swp
  426. new file mode 100644
  427. index 0000000000000000000000000000000000000000..bda64d91f7eba7b919b82563086927922b8a3958
  428. GIT binary patch
  429. literal 12288
  430. zcmeI2O>Epm6vwB~(gH11aD!GFHY=PWyiVFus)%i=Xy^xx6k34<QHUn??5>;jN5|tN
  431. zO9;Jj<N~4x4jhUQA1B0t8)^}kUbvx32yx+n$^npy)Fb@I_QcNarYYR0#?nul^~}8Y
  432. z=07v<If>`TUOhEMpKTl<xONjVwfM%_YwzqQtz|+)6iIb^v#S*e9<Xq;Zp7izb>cLR
  433. z@fn3JCy2bX%M&N=#6gdFfgd_B<F|Ms6UPsI*@)v!jhYTd0i(bjDzJ+j*grltQhS0v
  434. z`p7GHIL34{3K#{90!9I&fKk9GU=%P47zOSY1!TO1{Ef-n1KMCq0Y1!S6fg=H1&jhl
  435. z0i%FXz$jo8FbWt2i~>dhqrhFF0P_g>4!`uvdodyW|6lzL;Ksv*{0gpvAHWsx4fq0l
  436. z4&DPEI0T*nd%!mE<3oge3^+Inwt{bW5z++<;52v&T;2(P;0&mPKOZFIB8Wf;&Vj>V
  437. zH@NWtY=95J^I!}(fPkOwC*%{b7u?)I$S>eJxB}h>vtTdyYdaxd0|8oK8tehP!49w;
  438. z{B|E9--9o~XW&!tE(pQP;1oCsM!`;Sa~mPoz*TSsd<8Cnw*d#I!3cO9JO*xUMZDl6
  439. za0z?>RsjQba0~kX0e%NRgR9^&xCoZOB2a6T0CWAn6<8&NX4h)*NvUL_&1H78d4$$G
  440. zQpVn#dP&A_ul3<!k_xW-SY1C{u%0ejTYi_*6+JNN1*&zTXdI!%jX}R*B>h%T+dRj`
  441. zqVMvV!heFVT+9|$C`CMyhgp;eQt}|~GRa4+%KJN6;0+acgNu1<-|+bIiIw3k@%h}B
  442. za-pVNxGeS2t~c_Vk8Aj$+dwqA@4|?dChsz*zLuUnCfPhoxN;nFSNc)7VGM#_NPR2-
  443. zVwh&`0&7F4c%eNPvVhO(iBgKUnzBVgH*4(B!GmjSL}^<@X$-N^q~5J6$3#mZ7sDF#
  444. znqx#PcmnnHpck_hA5>~sl=*h*UrrvfdF&b$jT9-@hAFK$6=@jyVOzH;6WAb?otAA8
  445. zIx!eW#fTp!l6AY>D^?`V)f-|365txq5nx}?JnH{yU#|}$%uK^}5e*HPAJQU}LGzTB
  446. zn=c>PVt#j&*6J%06H(G)f#2<|Qk)-};ElFONbc3>zQT(d;qewryOK`OmCD_ItNN(r
  447. zCzdv;mAxg$5Lk!rchshBc$GKgva@AX3@TUa@&y*OFj6^}xxL#BE)Jj?TsR-_QaM3z
  448. zI>bxfL7&2n#(Tcn>e=`-5l+%!f>&lZFl=oN)hIQroL9B4b)3)pEVMQeyng{G)h8yi
  449. zeuS!nHB)cL?OCGkRIfC|>xxN!2dAbc;(*#0DEiuQI={esc72q)oru;)agW-z?1*T|
  450. zMuYDq^f_8z!R^(3^eyV963s5A&Roew(i|VR#}A`H3Tn+9vtOUJ@X72qXRUoTefr8!
  451. z+$g}Cl3sRWEfCue)IKb{42<H-+{KZzie88WQjyZ8`U$5aw}FspF<aIZoOwO!MIqPc
  452. zM2{L26I(#nh%B+_B2g<B%{e<gWuKTnVZSu_nmsu^dB)Dq)Lg*M&!ONXNW!bN>QTzw
  453. z>BOqOVbcA{RmY^0tnQ{VZ6ycmZaU>|(oLtaqFY}Q*2Z*=fvAI$7A7F+=JI(wakJA=
  454. zSXPTWxhw_KB`2YH+m=p3WDyG=h3kwTrps7!m6g^hNbT${6K=<sC~bIlSgjEqvHnEF
  455. zYOU8U<uEIej+5`!fqjHB7Ppa{+yy;IEynl|iSq)J?^4xwqkby0Mp*cO%T9#usvjm7
  456. z319Yxm<@a(BGL7e{CP=ruc-<*;W&9y(r9rn5-b+cc}%<!iFVPV1|1bVj+#8?-C_Ig
  457. zNu^g)$+=#*{xjH117$}YC}qmpaM@KWQcN86FTP4KT0xc8YWeHY3%-N2Vx#fS&Iu`P
  458. zsGru?6P=^82Y^a3nd%)=uUp@)9^|>an&pc@PWg;iO}}f-=PH#X>pIYDT^-ROB0p#c
  459. z|E7$n;p?hMVPwGRx+;<vks)2Jv)nt$WVML6>hZ8%7JZa+q9zNi6D}p5j`E7or1dh#
  460. z%~-n4(q*L5im^@F@ws4g9hP*ePtcamdn0s_2|s&6%X$*xb{UFK=>vg`kn(w^Y{+gO
  461. XkK8oC^CDBvwAr0zvq@j*vqAm=!aTdF
  462.  
  463. literal 0
  464. HcmV?d00001
  465.  
  466. diff --git a/modules/phpmyadmin/manifests/init.pp b/modules/phpmyadmin/manifests/init.pp
  467. index 596a829..adf6c26 100755
  468. --- a/modules/phpmyadmin/manifests/init.pp
  469. +++ b/modules/phpmyadmin/manifests/init.pp
  470. @@ -1,37 +1,58 @@
  471. # === Class phpmyadmin
  472. #
  473. -# Documentationsdf
  474. +# Documentation
  475. #
  476. # install phpmyadmin
  477. #
  478. class phpmyadmin {
  479.  
  480. # variable hiera
  481. - $phpmyadmin = hiera_hash('phpmyadmin')
  482. - $httpd_config = $phpmyadmin['httpd_config']
  483. - $web_server = $phpmyadmin['web_server']
  484. - $settings = $phpmyadmin['settings'];
  485. + $phpmyadmin = hiera_hash('phpmyadmin')
  486. + $settings = $phpmyadmin['settings']
  487.  
  488. case $::osfamily {
  489. 'RedHat' : {
  490. $pkg_name = 'phpMyAdmin'
  491. $config_dir = '/usr/share/phpMyAdmin'
  492. $config_file = '/etc/phpMyAdmin/config.inc.php'
  493. + $http_server = 'httpd'
  494. + $httpd_config = '/etc/phpMyAdmin/httpd.conf'
  495. + $httpd_symlink= '/etc/httpd/conf.d/phpMyAdmin.conf'
  496. + $gpg = "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${::os_maj_version}"
  497.  
  498. # ensure epel repo
  499. yumrepo { 'epel':
  500. - mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-${::os_maj_version}&arch=${::architecture}",
  501. - failovermethod => 'priority',
  502. - enabled => '1',
  503. - gpgcheck => '1',
  504. - gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${::os_maj_version}",
  505. - descr => "Extra Packages for Enterprise Linux ${::os_maj_version} - ${::architecture}"
  506. + mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-${::os_maj_version}&arch=${::architecture}",
  507. + failovermethod => 'priority',
  508. + enabled => '1',
  509. + gpgcheck => '1',
  510. + gpgkey => "file://${gpg}",
  511. + descr => "Extra Packages for Enterprise Linux ${::os_maj_version} - ${::architecture}"
  512. + }
  513. +
  514. + # ensure key
  515. + file { $gpg:
  516. + ensure => present,
  517. + owner => 'root',
  518. + group => 'root',
  519. + mode => '0644',
  520. + content => template("phpmyadmin/RPM-GPG-KEY-EPEL-${::os_maj_version}")
  521. + }
  522. +
  523. + # import key unless already done
  524. + exec { 'import gpg' :
  525. + command => "rpm --import ${gpg}",
  526. + unless => "rpm -q gpg-pubkey-$(echo $(gpg --throw-keyids < ${gpg}) | cut --characters=11-18 | tr '[A-Z]' '[a-z]')",
  527. + require => File[$gpg]
  528. }
  529. }
  530. 'Debian' : {
  531. $pkg_name = 'phpmyadmin'
  532. $config_dir = '/usr/share/phpmyadmin'
  533. $config_file = '/etc/phpmyadmin/config.inc.php'
  534. + $httpd_server = 'apache2'
  535. + $httpd_config = '/etc/phpmyadmin/apache.conf'
  536. + $httpd_symlink = '/etc/apache2/conf.d/phpmyadmin.conf'
  537. }
  538. default : {
  539. fail( "${::osfamily} not supported" )
  540. @@ -44,14 +65,14 @@ class phpmyadmin {
  541. }
  542.  
  543. # ensure web server
  544. - package { $web_server :
  545. - ensure => present
  546. + package { $httpd_server :
  547. + ensure => installed
  548. }
  549.  
  550. - service { $web_server :
  551. + service { $httpd_server :
  552. ensure => running,
  553. enable => true,
  554. - require => Package[$web_server]
  555. + require => Package[$httpd_server]
  556. }
  557.  
  558. File {
  559. @@ -70,7 +91,13 @@ class phpmyadmin {
  560. # webserver config
  561. file { $httpd_config:
  562. content => template('phpmyadmin/httpd.conf.erb'),
  563. - notify => Service[$web_server]
  564. + notify => Service[$httpd_server]
  565. + }
  566. +
  567. + # symlink
  568. + file { $httpd_symlink:
  569. + ensure => 'link',
  570. + target => $httpd_config
  571. }
  572.  
  573. }
  574. diff --git a/modules/phpmyadmin/manifests/init.pp~ b/modules/phpmyadmin/manifests/init.pp~
  575. new file mode 100755
  576. index 0000000..fe683cd
  577. --- /dev/null
  578. +++ b/modules/phpmyadmin/manifests/init.pp~
  579. @@ -0,0 +1,102 @@
  580. +# === Class phpmyadmin
  581. +#
  582. +# Documentation
  583. +#
  584. +# install phpmyadmin
  585. +#
  586. +class phpmyadmin {
  587. +
  588. + # variable hiera
  589. + $phpmyadmin = hiera_hash('phpmyadmin')
  590. + $settings = $phpmyadmin['settings']
  591. +
  592. + case $::osfamily {
  593. + 'RedHat' : {
  594. + $pkg_name = 'phpMyAdmin'
  595. + $config_dir = '/usr/share/phpMyAdmin'
  596. + $config_file = '/etc/phpMyAdmin/config.inc.php'
  597. + $http_server = 'httpd'
  598. + $httpd_config = '/etc/phpMyAdmin/httpd.conf'
  599. + $httpd_symlink= '/etc/httpd/conf.d/phpMyAdmin.conf'
  600. + $gpg = "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${::os_maj_version}"
  601. + # ensure epel repo
  602. + yumrepo { 'epel':
  603. + mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-${::os_maj_version}&arch=${::architecture}",
  604. + failovermethod => 'priority',
  605. + enabled => '1',
  606. + gpgcheck => '1',
  607. + gpgkey => "file://${gpg}",
  608. + descr => "Extra Packages for Enterprise Linux ${::os_maj_version} - ${::architecture}"
  609. + }
  610. +
  611. + # ensure key
  612. + file { "${gpg}":
  613. + ensure => present,
  614. + owner => 'root',
  615. + group => 'root',
  616. + mode => '0644',
  617. + content => template("phpmyadmin/RPM-GPG-KEY-EPEL-${::os_maj_version}")
  618. + }
  619. +
  620. + # import key unless already done
  621. + exec { 'import gpg' :
  622. + command => "rpm --import ${gpg}",
  623. + unless => "rpm -q gpg-pubkey-$(echo $(gpg --throw-keyids < ${gpg}) | cut --characters=11-18 | tr '[A-Z]' '[a-z]')",
  624. + require => File[$gpg]
  625. + }
  626. + }
  627. + 'Debian' : {
  628. + $pkg_name = 'phpmyadmin'
  629. + $config_dir = '/usr/share/phpmyadmin'
  630. + $config_file = '/etc/phpmyadmin/config.inc.php'
  631. + $httpd_server = 'apache2'
  632. + $httpd_config = '/etc/phpmyadmin/apache.conf'
  633. + $httpd_symlink = '/etc/apache2/conf.d/phpmyadmin.conf'
  634. + }
  635. + default : {
  636. + fail( "${::osfamily} not supported" )
  637. + }
  638. + }
  639. +
  640. + # install main package
  641. + package { $pkg_name :
  642. + ensure => installed
  643. + }
  644. +
  645. + # ensure web server
  646. + package { $httpd_server :
  647. + ensure => installed
  648. + }
  649. +
  650. + service { $httpd_server :
  651. + ensure => running,
  652. + enable => true,
  653. + require => Package[$httpd_server]
  654. + }
  655. +
  656. + File {
  657. + ensure => present,
  658. + owner => root,
  659. + group => root,
  660. + mode => '0644',
  661. + require => Package[$pkg_name],
  662. + }
  663. +
  664. + # database connection config
  665. + file { $config_file:
  666. + content => template('phpmyadmin/config.inc.php.erb')
  667. + }
  668. +
  669. + # webserver config
  670. + file { $httpd_config:
  671. + content => template('phpmyadmin/httpd.conf.erb'),
  672. + notify => Service[$httpd_server]
  673. + }
  674. +
  675. + # symlink
  676. + file { $httpd_symlink:
  677. + ensure => 'link',
  678. + target => $httpd_config
  679. + }
  680. +
  681. +}
  682. diff --git a/modules/phpmyadmin/templates/RPM-GPG-KEY-EPEL-5 b/modules/phpmyadmin/templates/RPM-GPG-KEY-EPEL-5
  683. new file mode 100644
  684. index 0000000..5a13bb4
  685. --- /dev/null
  686. +++ b/modules/phpmyadmin/templates/RPM-GPG-KEY-EPEL-5
  687. @@ -0,0 +1,30 @@
  688. +-----BEGIN PGP PUBLIC KEY BLOCK-----
  689. +Version: GnuPG v1.2.6 (GNU/Linux)
  690. +
  691. +mQGiBEXopTIRBACZDBMOoFOakAjaxw1LXjeSvh/kmE35fU1rXfM7T0AV31NATCLF
  692. +l5CQiNDA4oWreDThg2Bf6+LIVTsGQb1V+XXuLak4Em5yTYwMTVB//4/nMxQEbpl/
  693. +QB2XwlJ7EQ0vW+kiPDz/7pHJz1p1jADzd9sQQicMtzysS4qT2i5A23j0VwCg1PB/
  694. +lpYqo0ZhWTrevxKMa1n34FcD/REavj0hSLQFTaKNLHRotRTF8V0BajjSaTkUT4uk
  695. +/RTaZ8Kr1mTosVtosqmdIAA2XHxi8ZLiVPPSezJjfElsSqOAxEKPL0djfpp2wrTm
  696. +l/1iVnX+PZH5DRKCbjdCMLDJhYap7YUhcPsMGSeUKrwmBCBJUPc6DhjFvyhA9IMl
  697. +1T0+A/9SKTv94ToP/JYoCTHTgnG5MoVNafisfe0wojP2mWU4gRk8X4dNGKMj6lic
  698. +vM6gne3hESyjcqZSmr7yELPPGhI9MNauJ6Ob8cTR2T12Fmv9w03DD3MnBstR6vhP
  699. +QcqZKhc5SJYYY7oVfxlSOfF4xfwcHQKoD5TOKwIAQ6T8jyFpKbQkRmVkb3JhIEVQ
  700. +RUwgPGVwZWxAZmVkb3JhcHJvamVjdC5vcmc+iGQEExECACQFAkXopTICGwMFCRLM
  701. +AwAGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQEZzANiF1IfabmQCgzvE60MnHSOBa
  702. +ZXXF7uU2Vzu8EOkAoKg9h+j0NuNom6WUYZyJQt4zc5seuQINBEXopTYQCADapnR/
  703. +blrJ8FhlgNPl0X9S3JE/kygPbNXIqne4XBVYisVp0uzNCRUxNZq30MpY027JCs2J
  704. +nL2fMpwvx33f0phU029vrIZKA3CmnnwVsjcWfMJOVPBmVN7m5bGU68F+PdRIcDsl
  705. +PMOWRLkTBZOGolLgIbM4719fqA8etewILrX6uPvRDwywV7/sPCFpRcfNNBUY+Zx3
  706. +5bf4fnkaCKxgXgQS3AT+hGYhlzIqQVTkGNveHTnt4SSzgAqR9sSwQwqvEfVtYNeS
  707. +w5rDguLG41HQm1Hojv59HNYjH6F/S1rClZi21bLgZbKpCFX76qPt8CTw+iQLBPPd
  708. +yoOGHfzyp7nsfhUrAAMFB/9/H9Gpk822ZpBexQW4y3LGFo9ZSnmu+ueOZPU3SqDA
  709. +DW1ovZdYzGuJTGGM9oMl6bL8eZrcUBBOFaWge5wZczIE3hx2exEOkDdvq+MUDVD1
  710. +axmN45q/7h1NYRp5GQL2ZsoV4g9U2gMdzHOFtZCER6PP9ErVlfJpgBUCdSL93V4H
  711. +Sgpkk7znmTOklbCM6l/G/A6q4sCRqfzHwVSTiruyTBiU9lfROsAl8fjIq2OzWJ2T
  712. +P9sadBe1llUYaow7txYSUxssW+89avct35gIyrBbof5M+CBXyAOUaSWmpM2eub24
  713. +0qbqiSr/Y6Om0t6vSzR8gRk7g+1H6IE0Tt1IJCvCAMimiE8EGBECAA8FAkXopTYC
  714. +GwwFCRLMAwAACgkQEZzANiF1IfZQYgCgiZHCv4xb+sTHCn/otc1Ovvi/OgMAnRXY
  715. +bbsLFWOfmzAnNIGvFRWy+YHi
  716. +=MMNL
  717. +-----END PGP PUBLIC KEY BLOCK-----
  718. diff --git a/modules/phpmyadmin/templates/RPM-GPG-KEY-EPEL-6 b/modules/phpmyadmin/templates/RPM-GPG-KEY-EPEL-6
  719. new file mode 100644
  720. index 0000000..7a20304
  721. --- /dev/null
  722. +++ b/modules/phpmyadmin/templates/RPM-GPG-KEY-EPEL-6
  723. @@ -0,0 +1,29 @@
  724. +-----BEGIN PGP PUBLIC KEY BLOCK-----
  725. +Version: GnuPG v1.4.5 (GNU/Linux)
  726. +
  727. +mQINBEvSKUIBEADLGnUj24ZVKW7liFN/JA5CgtzlNnKs7sBg7fVbNWryiE3URbn1
  728. +JXvrdwHtkKyY96/ifZ1Ld3lE2gOF61bGZ2CWwJNee76Sp9Z+isP8RQXbG5jwj/4B
  729. +M9HK7phktqFVJ8VbY2jfTjcfxRvGM8YBwXF8hx0CDZURAjvf1xRSQJ7iAo58qcHn
  730. +XtxOAvQmAbR9z6Q/h/D+Y/PhoIJp1OV4VNHCbCs9M7HUVBpgC53PDcTUQuwcgeY6
  731. +pQgo9eT1eLNSZVrJ5Bctivl1UcD6P6CIGkkeT2gNhqindRPngUXGXW7Qzoefe+fV
  732. +QqJSm7Tq2q9oqVZ46J964waCRItRySpuW5dxZO34WM6wsw2BP2MlACbH4l3luqtp
  733. +Xo3Bvfnk+HAFH3HcMuwdaulxv7zYKXCfNoSfgrpEfo2Ex4Im/I3WdtwME/Gbnwdq
  734. +3VJzgAxLVFhczDHwNkjmIdPAlNJ9/ixRjip4dgZtW8VcBCrNoL+LhDrIfjvnLdRu
  735. +vBHy9P3sCF7FZycaHlMWP6RiLtHnEMGcbZ8QpQHi2dReU1wyr9QgguGU+jqSXYar
  736. +1yEcsdRGasppNIZ8+Qawbm/a4doT10TEtPArhSoHlwbvqTDYjtfV92lC/2iwgO6g
  737. +YgG9XrO4V8dV39Ffm7oLFfvTbg5mv4Q/E6AWo/gkjmtxkculbyAvjFtYAQARAQAB
  738. +tCFFUEVMICg2KSA8ZXBlbEBmZWRvcmFwcm9qZWN0Lm9yZz6JAjYEEwECACAFAkvS
  739. +KUICGw8GCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRA7Sd8qBgi4lR/GD/wLGPv9
  740. +qO39eyb9NlrwfKdUEo1tHxKdrhNz+XYrO4yVDTBZRPSuvL2yaoeSIhQOKhNPfEgT
  741. +9mdsbsgcfmoHxmGVcn+lbheWsSvcgrXuz0gLt8TGGKGGROAoLXpuUsb1HNtKEOwP
  742. +Q4z1uQ2nOz5hLRyDOV0I2LwYV8BjGIjBKUMFEUxFTsL7XOZkrAg/WbTH2PW3hrfS
  743. +WtcRA7EYonI3B80d39ffws7SmyKbS5PmZjqOPuTvV2F0tMhKIhncBwoojWZPExft
  744. +HpKhzKVh8fdDO/3P1y1Fk3Cin8UbCO9MWMFNR27fVzCANlEPljsHA+3Ez4F7uboF
  745. +p0OOEov4Yyi4BEbgqZnthTG4ub9nyiupIZ3ckPHr3nVcDUGcL6lQD/nkmNVIeLYP
  746. +x1uHPOSlWfuojAYgzRH6LL7Idg4FHHBA0to7FW8dQXFIOyNiJFAOT2j8P5+tVdq8
  747. +wB0PDSH8yRpn4HdJ9RYquau4OkjluxOWf0uRaS//SUcCZh+1/KBEOmcvBHYRZA5J
  748. +l/nakCgxGb2paQOzqqpOcHKvlyLuzO5uybMXaipLExTGJXBlXrbbASfXa/yGYSAG
  749. +iVrGz9CE6676dMlm8F+s3XXE13QZrXmjloc6jwOljnfAkjTGXjiB7OULESed96MR
  750. +XtfLk0W5Ab9pd7tKDR6QHI7rgHXfCopRnZ2VVQ==
  751. +=V/6I
  752. +-----END PGP PUBLIC KEY BLOCK-----
  753. diff --git a/modules/phpmyadmin/templates/config.inc.php.erb b/modules/phpmyadmin/templates/config.inc.php.erb
  754. index a757580..65ee7d0 100755
  755. --- a/modules/phpmyadmin/templates/config.inc.php.erb
  756. +++ b/modules/phpmyadmin/templates/config.inc.php.erb
  757. @@ -1,98 +1,30 @@
  758. <?php
  759. -/**
  760. - * phpMyAdmin configuration file, you can use it as base for the manual
  761. - * configuration. For easier setup you can use "setup/".
  762. - *
  763. - * All directives are explained in Documentation.html and on phpMyAdmin
  764. - * wiki <http://wiki.phpmyadmin.net>.
  765. - */
  766. +#############################################
  767. +# This is file is managed by puppet
  768. +# DO NOT EDIT IT BY HAND
  769.  
  770. -/*
  771. - * This is needed for cookie based authentication to encrypt password in
  772. - * cookie
  773. - */
  774. -$cfg['blowfish_secret'] = "<%= @settings['secret'] %>"; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
  775.  
  776. +$cfg['blowfish_secret'] = "<%= @settings['secret'] %>";
  777. /**
  778. * Server(s) configuration
  779. */
  780. $i = 0;
  781. -
  782. -// The $cfg['Servers'] array starts with $cfg['Servers'][1]. Do not use
  783. -// $cfg['Servers'][0]. You can disable a server config entry by setting host
  784. -// to ''. If you want more than one server, just copy following section
  785. -// (including $i incrementation) serveral times. There is no need to define
  786. -// full server array, just define values you need to change.
  787. +<% @servers.each do | server | -%>
  788. $i++;
  789. -$cfg['Servers'][$i]['host'] = "<%= @settings['dbserver'] %>"; // MySQL hostname or IP address
  790. -$cfg['Servers'][$i]['port'] = "<%= @settings['dbport'] %>"; // MySQL port - leave blank for default port
  791. -$cfg['Servers'][$i]['socket'] = ''; // Path to the socket - leave blank for default socket
  792. +$cfg['Servers'][$i]['host'] = "<%= @server['dbserver'] %>";
  793. +$cfg['Servers'][$i]['port'] = "<%= @server['dbport'] %>";
  794. +$cfg['Servers'][$i]['socket'] = '';
  795. $cfg['Servers'][$i]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
  796. $cfg['Servers'][$i]['extension'] = 'mysqli'; // The php MySQL extension to use ('mysql' or 'mysqli')
  797. $cfg['Servers'][$i]['compress'] = FALSE; // Use compressed protocol for the MySQL connection
  798. - // (requires PHP >= 4.3.0)
  799. -$cfg['Servers'][$i]['controluser'] = ''; // MySQL control user settings
  800. - // (this user must have read-only
  801. -$cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/user"
  802. - // and "mysql/db" tables).
  803. - // The controluser is also
  804. - // used for all relational
  805. - // features (pmadb)
  806. -$cfg['Servers'][$i]['auth_type'] = "<%= @settings['auth_type'] %>"; // Authentication method (config, http or cookie based)?
  807. -$cfg['Servers'][$i]['user'] = "<%= @settings['dbuser'] %>"; // MySQL user
  808. -$cfg['Servers'][$i]['password'] = "<%= @settings['dbpass'] %>"; // MySQL password (only needed
  809. - // with 'config' auth_type)
  810. -$cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only
  811. - // this db is displayed in left frame
  812. - // It may also be an array of db-names, where sorting order is relevant.
  813. -$cfg['Servers'][$i]['hide_db'] = ''; // Database name to be hidden from listings
  814. -$cfg['Servers'][$i]['verbose'] = ''; // Verbose name for this host - leave blank to show the hostname
  815. +$cfg['Servers'][$i]['controluser'] = '';
  816. +$cfg['Servers'][$i]['controlpass'] = '';
  817. +$cfg['Servers'][$i]['auth_type'] = "<%= @server['auth_type'] %>"; // Authentication method (config, http or cookie based)?
  818. +$cfg['Servers'][$i]['user'] = "<%= @server['dbuser'] %>"; // MySQL user
  819. +$cfg['Servers'][$i]['password'] = "<%= @server['dbpass'] %>"; // MySQL password (only needed
  820. +$cfg['Servers'][$i]['AllowRoot'] = <%= @server['AllowRoot'] %>; // whether to allow root login
  821.  
  822. -$cfg['Servers'][$i]['pmadb'] = ''; // Database used for Relation, Bookmark and PDF Features
  823. - // (see scripts/create_tables.sql)
  824. - // - leave blank for no support
  825. - // DEFAULT: 'phpmyadmin'
  826. -$cfg['Servers'][$i]['bookmarktable'] = ''; // Bookmark table
  827. - // - leave blank for no bookmark support
  828. - // DEFAULT: 'pma_bookmark'
  829. -$cfg['Servers'][$i]['relation'] = ''; // table to describe the relation between links (see doc)
  830. - // - leave blank for no relation-links support
  831. - // DEFAULT: 'pma_relation'
  832. -$cfg['Servers'][$i]['table_info'] = ''; // table to describe the display fields
  833. - // - leave blank for no display fields support
  834. - // DEFAULT: 'pma_table_info'
  835. -$cfg['Servers'][$i]['table_coords'] = ''; // table to describe the tables position for the PDF schema
  836. - // - leave blank for no PDF schema support
  837. - // DEFAULT: 'pma_table_coords'
  838. -$cfg['Servers'][$i]['pdf_pages'] = ''; // table to describe pages of relationpdf
  839. - // - leave blank if you don't want to use this
  840. - // DEFAULT: 'pma_pdf_pages'
  841. -$cfg['Servers'][$i]['column_info'] = ''; // table to store column information
  842. - // - leave blank for no column comments/mime types
  843. - // DEFAULT: 'pma_column_info'
  844. -$cfg['Servers'][$i]['history'] = ''; // table to store SQL history
  845. - // - leave blank for no SQL query history
  846. - // DEFAULT: 'pma_history'
  847. -$cfg['Servers'][$i]['verbose_check'] = TRUE; // set to FALSE if you know that your pma_* tables
  848. - // are up to date. This prevents compatibility
  849. - // checks and thereby increases performance.
  850. -$cfg['Servers'][$i]['AllowRoot'] = TRUE; // whether to allow root login
  851. -$cfg['Servers'][$i]['AllowDeny']['order'] // Host authentication order, leave blank to not use
  852. - = '';
  853. -$cfg['Servers'][$i]['AllowDeny']['rules'] // Host authentication rules, leave blank for defaults
  854. - = array();
  855. -$cfg['Servers'][$i]['AllowNoPassword'] // Allow logins without a password. Do not change the FALSE
  856. - = FALSE; // default unless you're running a passwordless MySQL server
  857. -$cfg['Servers'][$i]['designer_coords'] // Leave blank (default) for no Designer support, otherwise
  858. - = ''; // set to suggested 'pma_designer_coords' if really needed
  859. -$cfg['Servers'][$i]['bs_garbage_threshold'] // Blobstreaming: Recommented default value from upstream
  860. - = 50; // DEFAULT: '50'
  861. -$cfg['Servers'][$i]['bs_repository_threshold'] // Blobstreaming: Recommented default value from upstream
  862. - = '32M'; // DEFAULT: '32M'
  863. -$cfg['Servers'][$i]['bs_temp_blob_timeout'] // Blobstreaming: Recommented default value from upstream
  864. - = 600; // DEFAULT: '600'
  865. -$cfg['Servers'][$i]['bs_temp_log_threshold'] // Blobstreaming: Recommented default value from upstream
  866. - = '32M'; // DEFAULT: '32M'
  867. +<% end -%>
  868. /*
  869. * End of servers configuration
  870. */
  871. diff --git a/modules/phpmyadmin/templates/config.inc.php.erb~ b/modules/phpmyadmin/templates/config.inc.php.erb~
  872. new file mode 100755
  873. index 0000000..93214ac
  874. --- /dev/null
  875. +++ b/modules/phpmyadmin/templates/config.inc.php.erb~
  876. @@ -0,0 +1,80 @@
  877. +<?php
  878. +#############################################
  879. +# This is file is managed by puppet
  880. +# DO NOT EDIT IT BY HAND
  881. +
  882. +$cfg['blowfish_secret'] = "<%= @settings['secret'] %>";
  883. +/**
  884. + * Server(s) configuration
  885. + */
  886. +$i = 0;
  887. +$i++;
  888. +$cfg['Servers'][$i]['host'] = "<%= @settings['dbserver'] %>"; // MySQL hostname or IP address
  889. +$cfg['Servers'][$i]['port'] = "<%= @settings['dbport'] %>"; // MySQL port - leave blank for default port
  890. +$cfg['Servers'][$i]['socket'] = ''; // Path to the socket - leave blank for default socket
  891. +$cfg['Servers'][$i]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
  892. +$cfg['Servers'][$i]['extension'] = 'mysqli'; // The php MySQL extension to use ('mysql' or 'mysqli')
  893. +$cfg['Servers'][$i]['compress'] = FALSE; // Use compressed protocol for the MySQL connection
  894. + // (requires PHP >= 4.3.0)
  895. +$cfg['Servers'][$i]['controluser'] = ''; // MySQL control user settings
  896. + // (this user must have read-only
  897. +$cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/user"
  898. + // and "mysql/db" tables).
  899. + // The controluser is also
  900. + // used for all relational
  901. + // features (pmadb)
  902. +$cfg['Servers'][$i]['auth_type'] = "<%= @settings['auth_type'] %>"; // Authentication method (config, http or cookie based)?
  903. +$cfg['Servers'][$i]['user'] = "<%= @settings['dbuser'] %>"; // MySQL user
  904. +$cfg['Servers'][$i]['password'] = "<%= @settings['dbpass'] %>"; // MySQL password (only needed
  905. + // with 'config' auth_type)
  906. +$cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only
  907. + // this db is displayed in left frame
  908. + // It may also be an array of db-names, where sorting order is relevant.
  909. +$cfg['Servers'][$i]['hide_db'] = ''; // Database name to be hidden from listings
  910. +$cfg['Servers'][$i]['verbose'] = ''; // Verbose name for this host - leave blank to show the hostname
  911. +
  912. +$cfg['Servers'][$i]['pmadb'] = ''; // Database used for Relation, Bookmark and PDF Features
  913. + // (see scripts/create_tables.sql)
  914. + // - leave blank for no support
  915. + // DEFAULT: 'phpmyadmin'
  916. +$cfg['Servers'][$i]['bookmarktable'] = ''; // Bookmark table
  917. + // - leave blank for no bookmark support
  918. + // DEFAULT: 'pma_bookmark'
  919. +$cfg['Servers'][$i]['relation'] = ''; // table to describe the relation between links (see doc)
  920. + // - leave blank for no relation-links support
  921. + // DEFAULT: 'pma_relation'
  922. +$cfg['Servers'][$i]['table_info'] = ''; // table to describe the display fields
  923. + // - leave blank for no display fields support
  924. + // DEFAULT: 'pma_table_info'
  925. +$cfg['Servers'][$i]['table_coords'] = ''; // table to describe the tables position for the PDF schema
  926. + // - leave blank for no PDF schema support
  927. + // DEFAULT: 'pma_table_coords'
  928. +$cfg['Servers'][$i]['pdf_pages'] = ''; // table to describe pages of relationpdf
  929. + // - leave blank if you don't want to use this
  930. + // DEFAULT: 'pma_pdf_pages'
  931. +$cfg['Servers'][$i]['column_info'] = ''; // table to store column information
  932. + // - leave blank for no column comments/mime types
  933. + // DEFAULT: 'pma_column_info'
  934. +$cfg['Servers'][$i]['history'] = ''; // table to store SQL history
  935. + // - leave blank for no SQL query history
  936. + // DEFAULT: 'pma_history'
  937. +$cfg['Servers'][$i]['verbose_check'] = TRUE; // set to FALSE if you know that your pma_* tables
  938. + // are up to date. This prevents compatibility
  939. + // checks and thereby increases performance.
  940. +$cfg['Servers'][$i]['AllowRoot'] = <%= @settings['AllowRoot'] %>; // whether to allow root login
  941. +/*
  942. + * End of servers configuration
  943. + */
  944. +
  945. +/*
  946. + * Directories for saving/loading files from server
  947. + */
  948. +$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload';
  949. +$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save';
  950. +
  951. +/*
  952. + * Disable the default warning that is displayed on the DB Details Structure
  953. + * page if any of the required Tables for the relation features is not found
  954. + */
  955. +$cfg['PmaNoRelation_DisableWarning'] = TRUE;
  956. +?>
  957. diff --git a/modules/phpmyadmin/templates/httpd.conf.erb b/modules/phpmyadmin/templates/httpd.conf.erb
  958. index 97fb85b..4d8be53 100755
  959. --- a/modules/phpmyadmin/templates/httpd.conf.erb
  960. +++ b/modules/phpmyadmin/templates/httpd.conf.erb
  961. @@ -1,14 +1,11 @@
  962. -# phpMyAdmin - Web based MySQL browser written in php
  963. -#
  964. -# Allows only localhost by default
  965. -#
  966. -# But allowing phpMyAdmin to anyone other than localhost should be considered
  967. -# dangerous unless properly secured by SSL
  968. +#############################################
  969. +# This is file is managed by puppet
  970. +# DO NOT EDIT IT BY HAND
  971.  
  972. Alias /phpMyAdmin <%= @config_dir %>
  973. Alias /phpmyadmin <%= @config_dir %>
  974.  
  975. -<Directory /usr/share/phpMyAdmin/>
  976. +<Directory <%= @config_dir %>>
  977. # Access list
  978. Order Deny,Allow
  979. Deny from All
  980. @@ -16,30 +13,31 @@ Alias /phpmyadmin <%= @config_dir %>
  981. Allow from ::1
  982. </Directory>
  983.  
  984. -<Directory /usr/share/phpMyAdmin/setup/>
  985. - # Apache 2.2
  986. - Order Deny,Allow
  987. - Deny from All
  988. - Allow from <%= @settings['acl'] %>
  989. - Allow from ::1
  990. +<Directory <%= @config_dir %>/setup/>
  991. + <IfModule mod_authn_file.c>
  992. + AuthType Basic
  993. + AuthName "phpMyAdmin Setup"
  994. + AuthUserFile /etc/phpmyadmin/htpasswd.setup
  995. + </IfModule>
  996. + Require valid-user
  997. </Directory>
  998.  
  999. # These directories do not require access over HTTP - taken from the original
  1000. # phpMyAdmin upstream tarball
  1001. #
  1002. -<Directory /usr/share/phpMyAdmin/libraries/>
  1003. +<Directory <%= @config_dir %>/libraries/>
  1004. Order Deny,Allow
  1005. Deny from All
  1006. Allow from None
  1007. </Directory>
  1008.  
  1009. -<Directory /usr/share/phpMyAdmin/setup/lib/>
  1010. +<Directory <%= @config_dir %>/setup/lib/>
  1011. Order Deny,Allow
  1012. Deny from All
  1013. Allow from None
  1014. </Directory>
  1015.  
  1016. -<Directory /usr/share/phpMyAdmin/setup/frames/>
  1017. +<Directory <%= @config_dir %>/setup/frames/>
  1018. Order Deny,Allow
  1019. Deny from All
  1020. Allow from None
  1021. @@ -49,7 +47,7 @@ Alias /phpmyadmin <%= @config_dir %>
  1022. # filtering SQL etc. This may break your mod_security implementation.
  1023. #
  1024. #<IfModule mod_security.c>
  1025. -# <Directory /usr/share/phpMyAdmin/>
  1026. +# <Directory <%= @config_dir %>/>
  1027. # SecRuleInheritance Off
  1028. # </Directory>
  1029. #</IfModule>
  1030. diff --git a/modules/phpmyadmin/templates/httpd.conf.erb~ b/modules/phpmyadmin/templates/httpd.conf.erb~
  1031. new file mode 100755
  1032. index 0000000..c75244c
  1033. --- /dev/null
  1034. +++ b/modules/phpmyadmin/templates/httpd.conf.erb~
  1035. @@ -0,0 +1,52 @@
  1036. +#############################################
  1037. +# This is file is managed by puppet
  1038. +# DO NOT EDIT IT BY HAND
  1039. +
  1040. +Alias /phpMyAdmin <%= @config_dir %>
  1041. +Alias /phpmyadmin <%= @config_dir %>
  1042. +
  1043. +<Directory /usr/share/phpMyAdmin/>
  1044. + # Access list
  1045. + Order Deny,Allow
  1046. + Deny from All
  1047. + Allow from <%= @settings['acl'] %>
  1048. + Allow from ::1
  1049. +</Directory>
  1050. +
  1051. +<Directory /usr/share/phpMyAdmin/setup/>
  1052. + # Apache 2.2
  1053. + Order Deny,Allow
  1054. + Deny from All
  1055. + Allow from <%= @settings['acl'] %>
  1056. + Allow from ::1
  1057. +</Directory>
  1058. +
  1059. +# These directories do not require access over HTTP - taken from the original
  1060. +# phpMyAdmin upstream tarball
  1061. +#
  1062. +<Directory /usr/share/phpMyAdmin/libraries/>
  1063. + Order Deny,Allow
  1064. + Deny from All
  1065. + Allow from None
  1066. +</Directory>
  1067. +
  1068. +<Directory /usr/share/phpMyAdmin/setup/lib/>
  1069. + Order Deny,Allow
  1070. + Deny from All
  1071. + Allow from None
  1072. +</Directory>
  1073. +
  1074. +<Directory /usr/share/phpMyAdmin/setup/frames/>
  1075. + Order Deny,Allow
  1076. + Deny from All
  1077. + Allow from None
  1078. +</Directory>
  1079. +
  1080. +# This configuration prevents mod_security at phpMyAdmin directories from
  1081. +# filtering SQL etc. This may break your mod_security implementation.
  1082. +#
  1083. +#<IfModule mod_security.c>
  1084. +# <Directory /usr/share/phpMyAdmin/>
  1085. +# SecRuleInheritance Off
  1086. +# </Directory>
  1087. +#</IfModule>
  1088. diff --git a/modules/proftpd/manifests/init.pp b/modules/proftpd/manifests/init.pp
  1089. index c717ecb..f82cac1 100755
  1090. --- a/modules/proftpd/manifests/init.pp
  1091. +++ b/modules/proftpd/manifests/init.pp
  1092. @@ -11,6 +11,13 @@ class proftpd {
  1093. default => fail( "${::osfamily} not supported ")
  1094. }
  1095.  
  1096. + $config_file = $::osfamily ? {
  1097. + 'Debian' => '/etc/proftpd/proftpd.conf',
  1098. + 'RedHat' => '/etc/proftpd.conf',
  1099. + default => fail( "${::osfamily} not supported ")
  1100. +
  1101. + }
  1102. +
  1103. # install packages
  1104. package { $pkgs_name :
  1105. ensure => installed
  1106. @@ -25,6 +32,17 @@ class proftpd {
  1107. enable => true
  1108. }
  1109.  
  1110. + group { $settings['group'] :
  1111. + ensure => present
  1112. + } ->
  1113. +
  1114. + user { $settings['user'] :
  1115. + ensure => present,
  1116. + home => '/var/run/proftpd',
  1117. + gid => $settings['group'],
  1118. + shell => '/bin/false'
  1119. + }
  1120. +
  1121. File {
  1122. ensure => present,
  1123. owner => root,
  1124. @@ -33,17 +51,23 @@ class proftpd {
  1125. require => Package[$pkgs_name]
  1126. }
  1127.  
  1128. - file { '/etc/proftpd/proftpd.conf' :
  1129. + file { $config_file :
  1130. content => template('proftpd/proftpd.conf.erb'),
  1131. notify => Service['proftpd']
  1132. }
  1133. - file { [ '/etc/proftpd/sftp.d' , '/etc/proftpd/messages.d' ] :
  1134. +
  1135. + file { [ '/etc/proftpd', '/etc/proftpd/sftp.d' , '/etc/proftpd/messages.d' ] :
  1136. ensure => directory,
  1137. mode => '0755'
  1138. }
  1139. +
  1140. + # modules conf
  1141. + file { '/etc/proftpd/modules.conf' :
  1142. + content => template('proftpd/modules.conf.erb')
  1143. + }
  1144.  
  1145. - # script pour creer de nouveau utilisateur ftp
  1146. - file { '/usr/bin/new_ftp_account.sh' :
  1147. + # script pour creer de nouveau utilisateur ftp/sftp
  1148. + file { '/usr/local/sbin/new_ftp_account' :
  1149. mode => '0755',
  1150. content => template('proftpd/new_ftp_account.sh')
  1151. }
  1152. diff --git a/modules/proftpd/manifests/init.pp~ b/modules/proftpd/manifests/init.pp~
  1153. new file mode 100755
  1154. index 0000000..cd3f579
  1155. --- /dev/null
  1156. +++ b/modules/proftpd/manifests/init.pp~
  1157. @@ -0,0 +1,59 @@
  1158. +# === Class proftpd
  1159. +class proftpd {
  1160. +
  1161. + $proftpd = hiera_hash('proftpd')
  1162. + $settings = $proftpd['settings']
  1163. + $sftp = $proftpd['sftp']
  1164. +
  1165. + $pkgs_name = $::osfamily ? {
  1166. + 'Debian' => [ 'proftpd-basic', 'proftpd-mod-vroot' ],
  1167. + 'RedHat' => 'proftpd',
  1168. + default => fail( "${::osfamily} not supported ")
  1169. + }
  1170. +
  1171. + # install packages
  1172. + package { $pkgs_name :
  1173. + ensure => installed
  1174. + }
  1175. +
  1176. + package { 'pwgen' :
  1177. + ensure => installed
  1178. + }
  1179. +
  1180. + service { 'proftpd' :
  1181. + ensure => 'running',
  1182. + enable => true
  1183. + }
  1184. +
  1185. + File {
  1186. + ensure => present,
  1187. + owner => root,
  1188. + group => root,
  1189. + mode => '0644',
  1190. + require => Package[$pkgs_name]
  1191. + }
  1192. +
  1193. + file { '/etc/proftpd/proftpd.conf' :
  1194. + content => template('proftpd/proftpd.conf.erb'),
  1195. + notify => Service['proftpd']
  1196. + }
  1197. +
  1198. + file { [ '/etc/proftpd/sftp.d' , '/etc/proftpd/messages.d' ] :
  1199. + ensure => directory,
  1200. + mode => '0755'
  1201. + }
  1202. +
  1203. + # script pour creer de nouveau utilisateur ftp
  1204. + file { '/usr/bin/new_ftp_account.sh' :
  1205. + mode => '0755',
  1206. + content => template('proftpd/new_ftp_account.sh')
  1207. + }
  1208. +
  1209. + # create sftp instances
  1210. + each($sftp) { | $index, $value |
  1211. + File['/etc/proftpd/sftp.d'] ->
  1212. + proftpd::sftp { "install sftp vhost - ${value} ":
  1213. + settings => $sftp[$index]
  1214. + }
  1215. + }
  1216. +}
  1217. diff --git a/modules/proftpd/manifests/sftp.pp b/modules/proftpd/manifests/sftp.pp
  1218. index 5950315..2b60b86 100644
  1219. --- a/modules/proftpd/manifests/sftp.pp
  1220. +++ b/modules/proftpd/manifests/sftp.pp
  1221. @@ -9,7 +9,7 @@ define proftpd::sftp(
  1222. # create login motd
  1223. file { "/etc/proftpd/messages.d/login-${vhost_name}.msg" :
  1224. ensure => present,
  1225. - content => inline_template($settings['motd'])
  1226. + content => template('proftpd/banner.msg.erb')
  1227. }
  1228.  
  1229. # config file
  1230. diff --git a/modules/proftpd/templates/banner.msg.erb b/modules/proftpd/templates/banner.msg.erb
  1231. new file mode 100644
  1232. index 0000000..b5e5079
  1233. --- /dev/null
  1234. +++ b/modules/proftpd/templates/banner.msg.erb
  1235. @@ -0,0 +1,2 @@
  1236. +<%= @settings['motd'] %>
  1237. +
  1238. diff --git a/modules/proftpd/templates/modules.conf.erb b/modules/proftpd/templates/modules.conf.erb
  1239. new file mode 100644
  1240. index 0000000..7f6ca2f
  1241. --- /dev/null
  1242. +++ b/modules/proftpd/templates/modules.conf.erb
  1243. @@ -0,0 +1,18 @@
  1244. +###########################
  1245. +# THIS FILE IS MANAGED BY PUPPET
  1246. +# DO NOT EDIT IT BY HAND
  1247. +#ModulePath /usr/lib/proftpd
  1248. +ModuleControlsACLs insmod,rmmod allow user root
  1249. +ModuleControlsACLs lsmod allow user *
  1250. +LoadModule mod_ctrls_admin.c
  1251. +#LoadModule mod_tls.c
  1252. +LoadModule mod_radius.c
  1253. +LoadModule mod_quotatab.c
  1254. +LoadModule mod_quotatab_file.c
  1255. +LoadModule mod_quotatab_radius.c
  1256. +LoadModule mod_wrap.c
  1257. +LoadModule mod_rewrite.c
  1258. +LoadModule mod_load.c
  1259. +LoadModule mod_ban.c
  1260. +LoadModule mod_wrap2.c
  1261. +LoadModule mod_wrap2_file.c
  1262. diff --git a/modules/proftpd/templates/new_ftp_account.sh b/modules/proftpd/templates/new_ftp_account.sh
  1263. index 5048b40..7da03f0 100755
  1264. --- a/modules/proftpd/templates/new_ftp_account.sh
  1265. +++ b/modules/proftpd/templates/new_ftp_account.sh
  1266. @@ -18,47 +18,37 @@ SETCOLOR_SUCCESS="\\033[1;32m"
  1267. SETCOLOR_FAILURE="\\033[1;31m"
  1268. SETCOLOR_NORMAL="\\033[0;39m"
  1269.  
  1270. -
  1271. +if [ ! -e /usr/sbin/ftpasswd ]; then
  1272. + wget http://www.castaglia.org/proftpd/contrib/ftpasswd -O /usr/sbin/ftpasswd
  1273. + chmod 755 /usr/sbin/ftpasswd
  1274. +fi
  1275.  
  1276. if [ $# -ne 1 ]; then
  1277. echo "Usage: ${0##*/} <site_name>"
  1278. exit 1
  1279. fi
  1280.  
  1281. +
  1282. user_name=$1
  1283. passwd=`/usr/bin/pwgen -cn -N 1`
  1284. USER_FTP_HOMEDIR=$FTP_HOMEDIR/$user_name
  1285.  
  1286. echo -n "Creating SFTP defaut configuration: "
  1287. if [ ! -d $FTP_HOMEDIR/$user_name ]; then
  1288. - mkdir $USER_FTP_HOMEDIR fi
  1289. + mkdir $USER_FTP_HOMEDIR;
  1290. +fi
  1291. # root directory chown $USR_ID:$GRP_ID $USER_FTP_HOMEDIR chmod 550 $USER_FTP_HOMEDIR
  1292.  
  1293. # create dir
  1294. - mkdir $USER_FTP_HOMEDIR{conf,logs,bin,htdocs}
  1295. -
  1296. - chown $USR_ID:$GRP_ID $USER_FTP_HOMEDIR/conf
  1297. - chmod 550 $USER_FTP_HOMEDIR/conf
  1298. -
  1299. - # logs directory
  1300. - chown $USR_ID:$GRP_ID $USER_FTP_HOMEDIR/logs
  1301. - chmod 550 $USER_FTP_HOMEDIR/logs
  1302. -
  1303. - # bin directory
  1304. - chown $USR_ID:$GRP_ID $USER_FTP_HOMEDIR/bin
  1305. - chmod 550 $USER_FTP_HOMEDIR/bin
  1306. -
  1307. - # htdocs
  1308. - chown $USR_ID:$GRP_ID $USER_FTP_HOMEDIR/htdocs
  1309. - chmod 750 $USER_FTP_HOMEDIR/htdocs
  1310. + mkdir -p $USER_FTP_HOMEDIR/{conf,logs,bin,htdocs}
  1311. + chmod -R 550 $USER_FTP_HOMEDIR/conf
  1312. + chown -R $USR_ID:$GRP_ID $USER_FTP_HOMEDIR
  1313.  
  1314. echo -e "${MOVE_TO_COL}${SETCOLOR_SUCCESS}OK${SETCOLOR_NORMAL}"
  1315.  
  1316. # FTP user creation
  1317. echo -n "Creating SFTP account: "
  1318. -ftpasswd --passwd --file=$FTP_PASSWDFILE --home=$USER_FTP_HOMEDIR --name=$user_name --uid=$USR_ID --gid=$GRP_ID --shell=/bin/false --stdin <<< "$passwd" > /dev/null
  1319. +ftpasswd --passwd --file=$FTP_PASSWDFILE --home=$USER_FTP_HOMEDIR --name=$user_name --uid=$USR_ID --gid=$GRP_ID --shell=/bin/bash --stdin <<< "$passwd" > /dev/null
  1320. [ $? -eq 0 ] && echo -e "${MOVE_TO_COL}${SETCOLOR_SUCCESS}OK${SETCOLOR_NORMAL}" || echo -e "${MOVE_TO_COL}${SETCOLOR_FAILURE}KO${SETCOLOR_NORMAL}"
  1321.  
  1322. -echo
  1323. echo -e "Credential : ${MOVE_TO_COL_INFO}${SETCOLOR_INFO}$user_name/$passwd${SETCOLOR_NORMAL}"
  1324. -
  1325. diff --git a/modules/proftpd/templates/proftpd.conf.erb b/modules/proftpd/templates/proftpd.conf.erb
  1326. index 894a4ca..e11dcee 100644
  1327. --- a/modules/proftpd/templates/proftpd.conf.erb
  1328. +++ b/modules/proftpd/templates/proftpd.conf.erb
  1329. @@ -4,7 +4,7 @@
  1330. #
  1331.  
  1332. # Includes DSO modules
  1333. -Include /etc/proftpd/modules.conf
  1334. +#Include /etc/proftpd/modules.conf
  1335.  
  1336. # Set off to disable IPv6 support which is annoying on IPv4 only boxes.
  1337. # If set on you can experience a longer connection delay in many cases.
  1338. @@ -36,10 +36,14 @@ RequireValidShell off
  1339. TimesGMT off
  1340.  
  1341. # Port 21 is the standard FTP port.
  1342. +<% if @settings['enable_ftp'] == TRUE %>
  1343. Port <%= @settings['port'] %>
  1344. +<% else %>
  1345. +Port 0
  1346. +<% end %>
  1347.  
  1348. -User proftpd
  1349. -Group nogroup
  1350. +User <%= @settings['user'] %>
  1351. +Group <%= @settings['group'] %>
  1352. # Normally, we want files to be overwriteable.
  1353. AllowOverwrite on
  1354.  
  1355. @@ -51,5 +55,10 @@ PathDenyFilter "(\\.ftpaccess|\\.htaccess|\\.svn)$"
  1356. # Config
  1357. AuthPAM <%= @settings['pam_authentication'] %>
  1358. DefaultRoot ~
  1359. -Include /etc/proftpd/sftp.d/*
  1360. AuthUserFile /etc/proftpd/ftpd.passwd
  1361. +
  1362. +<% if @settings['enable_sftp'] == TRUE %>
  1363. +LoadModule mod_sftp.c
  1364. +LoadModule mod_sftp_pam.c
  1365. +Include /etc/proftpd/sftp.d/*
  1366. +<% end %>
  1367. diff --git a/modules/proftpd/templates/sftp.conf.erb b/modules/proftpd/templates/sftp.conf.erb
  1368. index 01a6d17..91d6893 100755
  1369. --- a/modules/proftpd/templates/sftp.conf.erb
  1370. +++ b/modules/proftpd/templates/sftp.conf.erb
  1371. @@ -3,7 +3,7 @@
  1372. <VirtualHost <%= @settings['ipaddress'] %> >
  1373.  
  1374. SFTPEngine On
  1375. - SFTPLog /var/log/proftpd/settings.log
  1376. + SFTPLog /var/log/proftpd/<%= @settings['vhost_name'] %>.log
  1377.  
  1378. ServerName <%= @hostname %>
  1379. ServerAdmin <%= @settings['server_admin'] %>
  1380. diff --git a/modules/puppet.conf b/modules/puppet.conf
  1381. deleted file mode 100644
  1382. index 0b74180..0000000
  1383. --- a/modules/puppet.conf
  1384. +++ /dev/null
  1385. @@ -1,18 +0,0 @@
  1386. -[main]
  1387. -logdir=/var/log/puppet
  1388. -vardir=/var/lib/puppet
  1389. -ssldir=/var/lib/puppet/ssl
  1390. -rundir=/var/run/puppet
  1391. -factpath=$vardir/lib/facter
  1392. -templatedir=$confdir/templates
  1393. -server = srv-1.puppet.deb
  1394. -certname = srv-1.puppet.deb
  1395. -
  1396. -[master]
  1397. -# These are needed when the puppetmaster is run by passenger
  1398. -# and can safely be removed if webrick is used.
  1399. -ssl_client_header = SSL_CLIENT_S_DN
  1400. -ssl_client_verify_header = SSL_CLIENT_VERIFY
  1401. -
  1402. -[agent]
  1403. - server = srv-1.puppet.deb
  1404. diff --git a/modules/tmux.conf b/modules/tmux.conf
  1405. deleted file mode 100644
  1406. index fe46eb4..0000000
  1407. --- a/modules/tmux.conf
  1408. +++ /dev/null
  1409. @@ -1,36 +0,0 @@
  1410. -# Set the prefix to ^a
  1411. -unbind C-b
  1412. -set -g prefix ^a
  1413. -
  1414. -#set vertical split
  1415. -unbind %
  1416. -bind | split-window -h
  1417. -bind h split-window -h
  1418. -
  1419. -# set horizontal split
  1420. -unbind -
  1421. -unbind '"'
  1422. -bind - split-window
  1423. -bind v split-window
  1424. -
  1425. -# set kill window
  1426. -unbind &
  1427. -bind k confirm-before -p "kill-window #W? (y/n)" kill-window
  1428. -
  1429. -# set rename window
  1430. -unbind r
  1431. -bind r command-prompt "rename-window %%"
  1432. -
  1433. -# select pane
  1434. -bind P command-prompt "select-pane -t %% "
  1435. -
  1436. -# list-clients
  1437. -unbind *
  1438. -bind * list-clients
  1439. -
  1440. -# lock-server
  1441. -unbind X
  1442. -bind X lock-server
  1443. -
  1444. -# tab select next pane
  1445. -#bind Tab select-pane -t :.+
  1446. #Done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement