mirror of
https://gh.wpcy.net/https://github.com/Chassis/puppet-wp.git
synced 2026-05-03 15:41:53 +08:00
1 line
No EOL
11 KiB
JavaScript
1 line
No EOL
11 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{202:function(t,a,e){"use strict";e.r(a);var s=e(0),r=Object(s.a)({},(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"config"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#config","aria-hidden":"true"}},[t._v("#")]),t._v(" Config")]),t._v(" "),e("ul",[e("li",[e("router-link",{attrs:{to:"/classes/config.html#description"}},[t._v("Description")])],1),t._v(" "),e("li",[e("router-link",{attrs:{to:"/classes/config.html#attributes"}},[t._v("Attributes")])],1)]),t._v(" "),e("h2",{attrs:{id:"description"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description","aria-hidden":"true"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("Generates and edits the wp-config.php file.")]),t._v(" "),e("h2",{attrs:{id:"attributes"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#attributes","aria-hidden":"true"}},[t._v("#")]),t._v(" Attributes")]),t._v(" "),e("div",{staticClass:"language-puppet extra-class"},[e("pre",{pre:!0,attrs:{class:"language-puppet"}},[e("code",[t._v(" wp"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),t._v("config "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'resource title'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("location")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# The location to run the command.")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ensure")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# What state the option should be in.")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("dbname")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# The database name.")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("dbuser")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# The database user.")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("dbpass")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# The database password.")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("dbhost")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# The database host name.")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("dbprefix")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# The database prefix.")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("dbcharset")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# The database character set.")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("dbcollate")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# The database collation.")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("locale")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# The langage that you want WordPress to use.")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("value")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# The value to send to the command.")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("unless")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# A test command that checks the state of the target system and restricts when the command can run.")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("user")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# The user to run the command as.")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("onlyif")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# A test command that checks the state of the target system and restricts when the command can run.")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("h3",{attrs:{id:"location"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#location","aria-hidden":"true"}},[t._v("#")]),t._v(" location")]),t._v(" "),e("p",[t._v("The directory from which to run the command. If this directory does not exist, the command will fail.")]),t._v(" "),e("h3",{attrs:{id:"ensure"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ensure","aria-hidden":"true"}},[t._v("#")]),t._v(" ensure")]),t._v(" "),e("p",[t._v("("),e("em",[t._v("If omitted, this attribute’s value defaults to "),e("code",[t._v("present")]),t._v(".")]),t._v(")")]),t._v(" "),e("p",[t._v("Values: "),e("code",[t._v("present")]),t._v(", "),e("code",[t._v("absent")]),t._v(" or "),e("code",[t._v("equal")]),t._v(".")]),t._v(" "),e("h3",{attrs:{id:"dbname"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#dbname","aria-hidden":"true"}},[t._v("#")]),t._v(" dbname")]),t._v(" "),e("p",[t._v("Set the database name.")]),t._v(" "),e("h3",{attrs:{id:"dbuser"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#dbuser","aria-hidden":"true"}},[t._v("#")]),t._v(" dbuser")]),t._v(" "),e("p",[t._v("Set the database user password.")]),t._v(" "),e("h3",{attrs:{id:"dbpass"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#dbpass","aria-hidden":"true"}},[t._v("#")]),t._v(" dbpass")]),t._v(" "),e("p",[t._v("Set the database host.")]),t._v(" "),e("h3",{attrs:{id:"dbhost"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#dbhost","aria-hidden":"true"}},[t._v("#")]),t._v(" dbhost")]),t._v(" "),e("p",[t._v("("),e("em",[t._v("If omitted, this attribute’s value defaults to "),e("code",[t._v("localhost")]),t._v(".")]),t._v(")")]),t._v(" "),e("h3",{attrs:{id:"dbprefix"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#dbprefix","aria-hidden":"true"}},[t._v("#")]),t._v(" dbprefix")]),t._v(" "),e("p",[t._v("("),e("em",[t._v("If omitted, this attribute’s value defaults to "),e("code",[t._v("wp_")]),t._v(".")]),t._v(")")]),t._v(" "),e("p",[t._v("Set the database table prefix.")]),t._v(" "),e("h3",{attrs:{id:"dbcharset"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#dbcharset","aria-hidden":"true"}},[t._v("#")]),t._v(" dbcharset")]),t._v(" "),e("p",[t._v("("),e("em",[t._v("If omitted, this attribute’s value defaults to "),e("code",[t._v("utf8")]),t._v(".")]),t._v(")")]),t._v(" "),e("p",[t._v("Set the database charset.")]),t._v(" "),e("h3",{attrs:{id:"dbcollate"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#dbcollate","aria-hidden":"true"}},[t._v("#")]),t._v(" dbcollate")]),t._v(" "),e("p",[t._v("("),e("em",[t._v("If omitted, this attribute’s value defaults to "),e("code",[t._v("''")]),t._v(".")]),t._v(")")]),t._v(" "),e("p",[t._v("Set the database collation.")]),t._v(" "),e("h3",{attrs:{id:"locale"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#locale","aria-hidden":"true"}},[t._v("#")]),t._v(" locale")]),t._v(" "),e("p",[t._v("("),e("em",[t._v("If omitted, this attribute’s value defaults to "),e("code",[t._v("en_AU")]),t._v(".")]),t._v(")")]),t._v(" "),e("p",[t._v("Set this to the language you'd like WordPress to use. e.g. "),e("code",[t._v("en_US")]),t._v(".")]),t._v(" "),e("h3",{attrs:{id:"value"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#value","aria-hidden":"true"}},[t._v("#")]),t._v(" value")]),t._v(" "),e("p",[t._v("("),e("em",[t._v("If omitted, this attribute’s value defaults to "),e("code",[t._v("''")]),t._v(".")]),t._v(")")]),t._v(" "),e("h3",{attrs:{id:"unless"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#unless","aria-hidden":"true"}},[t._v("#")]),t._v(" unless")]),t._v(" "),e("p",[t._v("("),e("em",[t._v("If omitted, this attribute’s value defaults to "),e("code",[t._v("undef")]),t._v(" which Puppet treats as "),e("code",[t._v("false")]),t._v(".")]),t._v(")")]),t._v(" "),e("p",[t._v("A test command that checks the state of the target system and restricts when the command can run.")]),t._v(" "),e("h3",{attrs:{id:"user"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#user","aria-hidden":"true"}},[t._v("#")]),t._v(" user")]),t._v(" "),e("p",[t._v("("),e("em",[t._v("If omitted, this attribute’s value defaults to "),e("code",[t._v("www-data")]),t._v(".")]),t._v(")")]),t._v(" "),e("h3",{attrs:{id:"onlyif"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#onlyif","aria-hidden":"true"}},[t._v("#")]),t._v(" onlyif")]),t._v(" "),e("p",[t._v("("),e("em",[t._v("If omitted, this attribute’s value defaults to "),e("code",[t._v("/usr/local/bin/wp core is-installed")]),t._v(".")]),t._v(")")]),t._v(" "),e("h3",{attrs:{id:"example"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#example","aria-hidden":"true"}},[t._v("#")]),t._v(" Example")]),t._v(" "),e("div",{staticClass:"language-puppet extra-class"},[e("pre",{pre:!0,attrs:{class:"language-puppet"}},[e("code",[t._v(" wp"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),t._v("config "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Create config'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("location")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/vagrant'")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("dbname")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'wordpress'")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("dbuser")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'wordpress'")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("dbpass")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'vagrantpassword'")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])}),[],!1,null,null,null);a.default=r.exports}}]); |