Set files owner and group
This commit is contained in:
parent
e5c7908e49
commit
6ee0e4cb78
3 changed files with 12 additions and 2 deletions
|
@ -17,10 +17,12 @@ ansible-playbook playbooks/cmdb.yml --skip-tags install
|
||||||
|
|
||||||
## Variablen
|
## Variablen
|
||||||
|
|
||||||
| Variable Name | Function | Default value | File | Comment |
|
| Variable Name | Function | Default value | File |
|
||||||
| ------------- | -------- | ------------- | ---- | ------- |
|
| ------------- | -------- | ------------- | ---- |
|
||||||
| `cmdb` | Dictionary for dokuwiki server variables _(required)_ | -- | `group_vars/all/cmdb.yml` |
|
| `cmdb` | Dictionary for dokuwiki server variables _(required)_ | -- | `group_vars/all/cmdb.yml` |
|
||||||
| `cmdb.wiki_server` | dokuwiki server _(required)_ | -- | `group_vars/all/cmdb.yml` |
|
| `cmdb.wiki_server` | dokuwiki server _(required)_ | -- | `group_vars/all/cmdb.yml` |
|
||||||
| `cmdb.wiki_pages_path` | path for wiki pages on dokuwiki server _(required)_ | -- | `group_vars/all/cmdb.yml` |
|
| `cmdb.wiki_pages_path` | path for wiki pages on dokuwiki server _(required)_ | -- | `group_vars/all/cmdb.yml` |
|
||||||
| `cmdb.wiki_media_path` | path for media on dokuwiki server _(required)_ | -- | `group_vars/all/cmdb.yml` |
|
| `cmdb.wiki_media_path` | path for media on dokuwiki server _(required)_ | -- | `group_vars/all/cmdb.yml` |
|
||||||
| `cmdb.wiki_meta_path` | path for metadata on dokuwiki server _(required)_ | -- | `group_vars/all/cmdb.yml` |
|
| `cmdb.wiki_meta_path` | path for metadata on dokuwiki server _(required)_ | -- | `group_vars/all/cmdb.yml` |
|
||||||
|
| `cmdb.wiki_owner` | File system owner of wiki files and directories _(required)_ | -- | `group_vars/all/cmdb.yml`|
|
||||||
|
| `cmdb.wiki_group` | File system group of wiki files and directories _(required)_ | -- | `group_vars/all/cmdb.yml`|
|
||||||
|
|
|
@ -34,5 +34,7 @@
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: hypervisor.txt.j2
|
src: hypervisor.txt.j2
|
||||||
dest: "{{ cmdb.wiki_pages_path }}/servers/hypervisor.txt"
|
dest: "{{ cmdb.wiki_pages_path }}/servers/hypervisor.txt"
|
||||||
|
owner: "{{ cmdb.wiki_owner }}"
|
||||||
|
group: "{{ cmdb.wiki_group }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
delegate_to: "{{ cmdb.wiki_server }}"
|
delegate_to: "{{ cmdb.wiki_server }}"
|
||||||
|
|
|
@ -3,17 +3,23 @@
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: servers.txt.j2
|
src: servers.txt.j2
|
||||||
dest: "{{ cmdb.wiki_pages_path }}/servers.txt"
|
dest: "{{ cmdb.wiki_pages_path }}/servers.txt"
|
||||||
|
owner: "{{ cmdb.wiki_owner }}"
|
||||||
|
group: "{{ cmdb.wiki_group }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
|
||||||
- name: "Server | Write startpage for all servers"
|
- name: "Server | Write startpage for all servers"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: all.txt.j2
|
src: all.txt.j2
|
||||||
dest: "{{ cmdb.wiki_pages_path }}/servers/all.txt"
|
dest: "{{ cmdb.wiki_pages_path }}/servers/all.txt"
|
||||||
|
owner: "{{ cmdb.wiki_owner }}"
|
||||||
|
group: "{{ cmdb.wiki_group }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
|
||||||
- name: "Server | Write server item"
|
- name: "Server | Write server item"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: item.txt.j2
|
src: item.txt.j2
|
||||||
dest: "{{ cmdb.wiki_pages_path }}/servers/all/{{ inventory_hostname }}.txt"
|
dest: "{{ cmdb.wiki_pages_path }}/servers/all/{{ inventory_hostname }}.txt"
|
||||||
|
owner: "{{ cmdb.wiki_owner }}"
|
||||||
|
group: "{{ cmdb.wiki_group }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
tags: server_item
|
tags: server_item
|
||||||
|
|
Loading…
Reference in a new issue