Skip to content

Commit

Permalink
Update README.md in regard to string encapsulation
Browse files Browse the repository at this point in the history
We are now using the correct string encapsulation syntax in the
README.md and added a small note above the example code.

See #3, #1
  • Loading branch information
e1mo committed Oct 30, 2020
1 parent cda16e1 commit c1f50aa
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ Example Playbook

<!--Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:-->

Node: When you want to define multi-dimensional configuration parameters in `dokuwiki_additonal_configuration` you can concatenate the levels using `>` in the name as a seperator. So `auth>mysql>server` would become `$conf['auth']['mysql']['server']`.
Note: When you want to define multi-dimensional configuration parameters in `dokuwiki_additonal_configuration` you can concatenate the levels using `>` in the name as a separator. So `auth>mysql>server` would become `$conf['auth']['mysql']['server']`.

Further more, all strings inside the `dokuwiki_additonal_configuration` list must be wrapped in two quotation marks like so: `"'my string'"`. The double quotation marks tell ansible that the value is a string and so the single quotation marks will be a normal part of the string and placed as a string in the `local.php`. See [#3](https://github.com/chaos-jetzt/ansible-role-dokuwiki/pull/3#issuecomment-719563190) for another explanation why it's done that way.

```yaml
---
Expand Down Expand Up @@ -57,13 +59,13 @@ Node: When you want to define multi-dimensional configuration parameters in `dok
source: "https://www.dokuwiki.org/lib/tpl/dokuwiki/images/logo.png"
dokuwiki_additonal_configuration:
- name: 'auth>mysql>server'
value: localhost
value: "'localhost'"
- name: 'auth>mysql>user'
value: dbuser
value: "'dbuser'"
- name: 'auth>mysql>password'
value: localhost
value: "'localhost'"
- name: 'auth>mysql>database'
value: localhost
value: "'localhost'"
```
License
Expand Down

0 comments on commit c1f50aa

Please sign in to comment.