|
|
|
|
|
|
|
|
pkg.installed: |
|
|
pkg.installed: |
|
|
- pkgs: {{ storage.lvm_pkgs }} |
|
|
- pkgs: {{ storage.lvm_pkgs }} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/etc/lvm/lvm.conf: |
|
|
|
|
|
file.managed: |
|
|
|
|
|
- source: salt://linux/files/lvm.conf |
|
|
|
|
|
- template: jinja |
|
|
|
|
|
- require: |
|
|
|
|
|
- pkg: linux_lvm_pkgs |
|
|
|
|
|
|
|
|
|
|
|
lvm_services: |
|
|
|
|
|
service.running: |
|
|
|
|
|
- enable: true |
|
|
|
|
|
- names: {{ storage.lvm_services }} |
|
|
|
|
|
- require: |
|
|
|
|
|
- file: /etc/lvm/lvm.conf |
|
|
|
|
|
- watch: |
|
|
|
|
|
- file: /etc/lvm/lvm.conf |
|
|
|
|
|
|
|
|
{%- for vgname, vg in storage.lvm.iteritems() %} |
|
|
{%- for vgname, vg in storage.lvm.iteritems() %} |
|
|
|
|
|
|
|
|
{%- if vg.get('enabled', True) %} |
|
|
{%- if vg.get('enabled', True) %} |
|
|
|
|
|
|
|
|
- name: {{ dev }} |
|
|
- name: {{ dev }} |
|
|
- require: |
|
|
- require: |
|
|
- pkg: linux_lvm_pkgs |
|
|
- pkg: linux_lvm_pkgs |
|
|
|
|
|
- file: /etc/lvm/lvm.conf |
|
|
|
|
|
- service: lvm_services |
|
|
- require_in: |
|
|
- require_in: |
|
|
- lvm: lvm_vg_{{ vg.get('name', vgname) }} |
|
|
- lvm: lvm_vg_{{ vg.get('name', vgname) }} |
|
|
{%- endfor %} |
|
|
{%- endfor %} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{%- endfor %} |
|
|
{%- endfor %} |
|
|
|
|
|
|
|
|
/etc/lvm/lvm.conf: |
|
|
|
|
|
file.managed: |
|
|
|
|
|
- source: salt://linux/files/lvm.conf |
|
|
|
|
|
- template: jinja |
|
|
|
|
|
- require: |
|
|
|
|
|
- pkg: linux_lvm_pkgs |
|
|
|
|
|
|
|
|
|
|
|
lvm_services: |
|
|
|
|
|
service.running: |
|
|
|
|
|
- enable: true |
|
|
|
|
|
- names: {{ storage.lvm_services }} |
|
|
|
|
|
- require: |
|
|
|
|
|
- file: /etc/lvm/lvm.conf |
|
|
|
|
|
- watch: |
|
|
|
|
|
- file: /etc/lvm/lvm.conf |
|
|
|
|
|
|
|
|
|
|
|
{%- endif %} |
|
|
|
|
|
|
|
|
{%- endif %} |