diff --git a/iscsi/initiator/defaults.yaml b/iscsi/initiator/defaults.yaml index efc3b402..cc2f8c4e 100644 --- a/iscsi/initiator/defaults.yaml +++ b/iscsi/initiator/defaults.yaml @@ -9,7 +9,7 @@ iscsi: vendor: FreeBSD Foundation svcname: iscsid kmodule: iscsi_initiator - modloadtext: iscsi_initiator_load="YES" + kmoduletext: iscsi_initiator_load="YES" svcloadfile: /etc/rc.conf svcloadtext: iscsictl_enable="YES" config: /etc/iscsi.conf @@ -28,7 +28,7 @@ iscsi: vendor: Open-iSCSI svcname: open-iscsi kmodule: None - modloadtext: xxxxxxxxx="YES" + kmoduletext: xxxxxxxxx="YES" svcloadfile: svcloadtext: config: /etc/iscsi/iscsid.conf @@ -72,7 +72,7 @@ iscsi: vendor: svcname: ['fcoe', 'lldpad',] kmodule: None - modloadtext: xxxxxxxxx="YES" + kmoduletext: xxxxxxxxx="YES" svcloadfile: svcloadtext: targetconf: /etc/fcoe/cfg-ethx diff --git a/iscsi/initiator/install.sls b/iscsi/initiator/install.sls index 523b98d9..4d34f527 100644 --- a/iscsi/initiator/install.sls +++ b/iscsi/initiator/install.sls @@ -76,25 +76,25 @@ iscsi_initiator_service_config: data: {{ data|json }} component: 'initiator' provider: {{ provider }} - json: {{ data['man5']['format']['json']|json }} + json: {{ data.man5.format.json|json }} - {%- if iscsi.kernel.mess_with_kernel and data.man5.kmodule and data.man5.kloadtext %} + {%- if iscsi.kernel.mess_with_kernel and data.man5.kmodule and data.man5.kmoduletext %} iscsi_initiator_kernel_module: file.line: - name: {{ iscsi.kernel.modloadfile }} - - content: {{ data.man5.kloadtext }} + - content: {{ data.man5.kmoduletext }} - backup: True {%- if not iscsi.client.enabled %} - mode: delete cmd.run: - - name: {{ iscsi.initiator.kernel.modunload }} - - onlyif: {{ iscsi.initiator.kernel.modquery }} + - name: {{ iscsi.kernel.modunload }} {{ data.man5.kmodule }} + - onlyif: {{ iscsi.kernel.modquery }} {{ data.man5.kmodule }} {%- else %} - mode: ensure - after: autoboot_delay.*$ cmd.run: - - name: {{ iscsi.initiator.kernel.modload }} - - unless: {{ iscsi.initiator.kernel.modquery }} + - name: {{ iscsi.kernel.modload }} {{ data.man5.kmodule }} + - unless: {{ iscsi.kernel.modquery }} {{ data.man5.kmodule }} - require: - file: iscsi_initiator_kernel_module {%- endif %} @@ -130,4 +130,3 @@ iscsi_initiator_service: {%- if data.man5.kmodule %} - unless: {{ iscsi.kernel.modquery }} {{ data.man5.kmodule }} {%- endif %} - diff --git a/iscsi/initiator/remove.sls b/iscsi/initiator/remove.sls index aaff2344..183ca2c6 100644 --- a/iscsi/initiator/remove.sls +++ b/iscsi/initiator/remove.sls @@ -17,17 +17,16 @@ iscsi_initiator_service_dead: - onlyif: {{ iscsi.kernel.modquery }} {{ data.man5.kmodule }} {%- endif %} - {%- set kmodule = iscsi.client['provider']['man5']['kmodule'] %} - {%- if iscsi.kernel.mess_with_kernel and data.man5.kmodule and data.man5.kloadtext %} + {%- if iscsi.kernel.mess_with_kernel and data.man5.kmodule and data.man5.kmoduletext %} iscsi_initiator_kernel_module_{{ data.man5.kmodule }}_removed: file.line: - name: {{ iscsi.kernel.modloadfile }} - - content: {{ data.man5.kloadtext }} + - content: {{ data.man5.kmoduletext }} - backup: True - mode: delete cmd.run: - - name: {{ iscsi.initiator.kernel.modunload }} - - onlyif: {{ iscsi.initiator.kernel.modquery }} + - name: {{ iscsi.kernel.modunload }} {{ data.man5.kmodule }} + - onlyif: {{ iscsi.kernel.modquery }} {{ data.man5.kmodule }} - require: - iscsi_initiator_service_dead - require_in: @@ -44,5 +43,5 @@ iscsi_initiator_wanted_pkgs_{{ pkg }}_removed: iscsi_initiator_service_config_removed: file.absent: - - name: {{ iscsi.initiator.man5.config }} - - onlyif: test -f {{ iscsi.initiator.man5.config }} + - name: {{ data.man5.config }} + - onlyif: test -f {{ data.man5.config }} diff --git a/iscsi/isns/remove.sls b/iscsi/isns/remove.sls index 6922bd6c..cf030df7 100644 --- a/iscsi/isns/remove.sls +++ b/iscsi/isns/remove.sls @@ -28,4 +28,3 @@ iscsi_isns_remove_{{ pkg }}_pkg: - require: - service: iscsi_isns_service_config_removed {% endfor %} - diff --git a/iscsi/target/defaults.yaml b/iscsi/target/defaults.yaml index 4ddc32fc..4ec5e378 100644 --- a/iscsi/target/defaults.yaml +++ b/iscsi/target/defaults.yaml @@ -9,7 +9,7 @@ iscsi: vendor: tgt project svcname: tgtd kmodule: None - modloadtext: xxxxxxxxx="YES" + kmoduletext: xxxxxxxxx="YES" svcloadfile: svcloadtext: config: /etc/tgt/conf.d/targets.conf @@ -36,7 +36,7 @@ iscsi: vendor: FreeBSD Foundation svcname: ctld #CAM Target Layer/iSCSI target daemon kmodule: cfiscsi - modloadtext: cfiscsi_load="YES" + kmoduletext: cfiscsi_load="YES" svcloadfile: /etc/rc.conf svcloadtext: 'iscsid_enable="YES"' allowconf: @@ -68,7 +68,7 @@ iscsi: vendor: IET project svcname: iscsitarget kmodule: iscsi_trgt - modloadtext: iscsi_trgt + kmoduletext: iscsi_trgt svcloadfile: svcloadtext: config: /etc/ietd.conf @@ -108,7 +108,7 @@ iscsi: vendor: Kernel.org svcname: target kmodule: target_core_mod - modloadtext: target_core_mod + kmoduletext: target_core_mod svcloadfile: svcloadtext: config: /etc/target/saveconfig.json @@ -133,7 +133,7 @@ iscsi: vendor: svcname: fcoe-target kmodule: fcoe_target - modloadtext: fcoe_target + kmoduletext: fcoe_target svcloadfile: svcloadtext: config: .... diff --git a/iscsi/target/install.sls b/iscsi/target/install.sls index 94d9dd5a..b97ce8f1 100644 --- a/iscsi/target/install.sls +++ b/iscsi/target/install.sls @@ -76,25 +76,25 @@ iscsi_target_service_config: data: {{ data|json }} component: 'target' provider: {{ provider }} - json: {{ data['man5']['format']['json']|json }} + json: {{ data.man5.format.json|json }} - {%- if iscsi.kernel.mess_with_kernel and data.man5.kmodule and data.man5.kloadtext %} + {%- if iscsi.kernel.mess_with_kernel and data.man5.kmodule and data.man5.kmoduletext %} iscsi_target_kernel_module: file.line: - name: {{ iscsi.kernel.modloadfile }} - - content: {{ data.man5.kloadtext }} + - content: {{ data.man5.kmoduletext }} - backup: True {%- if not data.enabled %} - mode: delete cmd.run: - - name: {{ data.kernel.modunload }} - - onlyif: {{ data.kernel.modquery }} + - name: {{ iscsi.kernel.modunload }} {{ data.man5.kmodule }} + - onlyif: {{ iscsi.kernel.modquery }} {{ data.man5.kmodule }} {%- else %} - mode: ensure - after: 'autoboot_delay.*' cmd.run: - - name: {{ data.kernel.modload }} - - unless: {{ data.kernel.modquery }} + - name: {{ iscsi.kernel.modload }} {{ data.man5.kmodule }} + - unless: {{ iscsi.kernel.modquery }} {{ data.man5.kmodule }} - require: - file: iscsi_target_kernel_module {%- endif %} @@ -132,4 +132,3 @@ iscsi_target_service_running: {%- if data.man5.kmodule %} - unless: {{ iscsi.kernel.modquery }} {{ data.man5.kmodule }} {%- endif %} - diff --git a/iscsi/target/remove.sls b/iscsi/target/remove.sls index 76647c37..f8e0b40f 100644 --- a/iscsi/target/remove.sls +++ b/iscsi/target/remove.sls @@ -17,18 +17,16 @@ iscsi_target_service_dead: - onlyif: {{ iscsi.kernel.modquery }} {{ data.man5.kmodule }} {%- endif %} - - {%- set kmodule = iscsi.server['provider']['man5']['kmodule'] %} - {%- if iscsi.kernel.mess_with_kernel and data.man5.kmodule and data.man5.kloadtext %} + {%- if iscsi.kernel.mess_with_kernel and data.man5.kmodule and data.man5.kmoduletext %} iscsi_target_kernel_module_{{ data.man5.kmodule }}_removed: file.line: - name: {{ iscsi.kernel.modloadfile }} - - content: {{ data.man5.kloadtext }} + - content: {{ data.man5.kmoduletext }} - backup: True - mode: delete cmd.run: - - name: {{ iscsi.target.kernel.modunload }} - - onlyif: {{ iscsi.target.kernel.modquery }} + - name: {{ iscsi.kernel.modunload }} {{ data.man5.kmodule }} + - onlyif: {{ iscsi.kernel.modquery }} {{ data.man5.kmodule }} - require: - iscsi_target_service_dead - require_in: @@ -45,6 +43,5 @@ iscsi_target_wanted_pkgs_{{ pkg }}_removed: iscsi_target_service_config_removed: file.absent: - - name: {{ iscsi.target.man5.config }} - - onlyif: test -f {{ iscsi.target.man5.config }} - + - name: {{ data.man5.config }} + - onlyif: test -f {{ data.man5.config }}