Skip to content

Commit

Permalink
fix(os): fix open-iscsi on archlinux
Browse files Browse the repository at this point in the history
  • Loading branch information
noelmcloughlin committed Sep 11, 2019
1 parent 499e356 commit 43b2ad4
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
6 changes: 5 additions & 1 deletion iscsi/initiator/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ iscsi_initiator_service_config:
data: {{ data|json }}
component: 'initiator'
provider: {{ provider }}
json: {{ data['man5']['format']['json'] }}
json: {{ data['man5']['format']['json']|json }}
{%- if iscsi.kernel.mess_with_kernel and data.man5.kmodule and data.man5.kloadtext %}
iscsi_initiator_kernel_module:
Expand Down Expand Up @@ -122,7 +122,11 @@ iscsi_initiator_service:
- watch:
- file: iscsi_initiator_service_config
{%- endif %}
{%- if data.man5.svcname is iterable and data.man5.svcname is not string %}
- names: {{ data.man5.svcname|json }}
{%- else %}
- name: {{ data.man5.svcname }}
{%- endif %}
{%- if data.man5.kmodule %}
- unless: {{ iscsi.kernel.modquery }} {{ data.man5.kmodule }}
{%- endif %}
Expand Down
6 changes: 6 additions & 0 deletions iscsi/osfamilymap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ Gentoo:
kmodule: iscsi_tcp

Arch:
initiator:
open-iscsi:
man5:
svcname: ##open-iscsi on archlinux uses non-standard service names
- iscsi
- iscsid
user: iscsimake
client:
make:
Expand Down
2 changes: 1 addition & 1 deletion iscsi/target/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ iscsi_target_service_config:
data: {{ data|json }}
component: 'target'
provider: {{ provider }}
json: {{ data['man5']['format']['json'] }}
json: {{ data['man5']['format']['json']|json }}
{%- if iscsi.kernel.mess_with_kernel and data.man5.kmodule and data.man5.kloadtext %}
iscsi_target_kernel_module:
Expand Down
17 changes: 17 additions & 0 deletions pillar.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
#Sample pillars for iSNS/iSCSI on FreeBSD and GNU/Linux

{% if grains.os == 'Arch' %}
### this user is needed for archlinux
users:
iscsimake:
sudouser: True
shell: /bin/bash
empty_password: True
home: /home/iscsimake
createhome: True
optional_groups:
- wheel
- root
sudo_rules:
- 'ALL=(ALL) ALL'
{% endif %}


iscsi:
isns:
enabled: True
Expand Down

0 comments on commit 43b2ad4

Please sign in to comment.