Skip to content

Commit

Permalink
test(travis): fixup yamllint
Browse files Browse the repository at this point in the history
  • Loading branch information
noelmcloughlin committed Oct 4, 2019
1 parent b8d8b7f commit 9690093
Show file tree
Hide file tree
Showing 15 changed files with 173 additions and 118 deletions.
20 changes: 18 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,42 @@ services:
# Ref: https://github.com/saltstack-formulas/template-formula/issues/121
env:
matrix:
- INSTANCE: default-debian-10-develop-py3
- INSTANCE: debian-10-develop-py3
# - INSTANCE: default-ubuntu-1804-develop-py3
<<<<<<< HEAD
# - INSTANCE: default-centos-7-develop-py3
# - INSTANCE: default-fedora-30-develop-py3
=======
- INSTANCE: centos-7-develop-py3
# INSTANCE: default-fedora-30-develop-py3
>>>>>>> 863e40c... fix(service): only start service if enabled
# - INSTANCE: default-opensuse-leap-15-develop-py3
# - INSTANCE: default-amazonlinux-2-develop-py2
# - INSTANCE: default-arch-base-latest-develop-py2
# - INSTANCE: default-debian-9-2019-2-py3
<<<<<<< HEAD
- INSTANCE: default-ubuntu-1804-2019-2-py3
# - INSTANCE: default-centos-7-2019-2-py3
=======
- INSTANCE: ubuntu-1804-2019-2-py3
- INSTANCE: centos-7-2019-2-py3
>>>>>>> 863e40c... fix(service): only start service if enabled
# - INSTANCE: default-fedora-30-2019-2-py3
# - INSTANCE: default-opensuse-leap-15-2019-2-py3
# INSTANCE: default-amazonlinux-2-2019-2-py2
- INSTANCE: default-arch-base-latest-2019-2-py2
- INSTANCE: arch-base-latest-2019-2-py2
# - INSTANCE: default-debian-9-2018-3-py2
# - INSTANCE: default-ubuntu-1604-2018-3-py2
# - INSTANCE: default-centos-7-2018-3-py2
<<<<<<< HEAD
- INSTANCE: default-fedora-29-2018-3-py2
- INSTANCE: default-opensuse-leap-15-2018-3-py2
- INSTANCE: default-amazonlinux-2-2018-3-py2
=======
# INSTANCE: fedora-29-2018-3-py2
- INSTANCE: opensuse-leap-15-2018-3-py2
- INSTANCE: amazonlinux-2-2018-3-py2
>>>>>>> 863e40c... fix(service): only start service if enabled
# - INSTANCE: default-arch-base-latest-2018-3-py2
# - INSTANCE: default-debian-8-2017-7-py2
# - INSTANCE: default-ubuntu-1604-2017-7-py2
Expand Down
1 change: 1 addition & 0 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ extends: default
ignore: |
node_modules/
test/**/states/**/*.sls
iscsi/oscodename.yaml
yaml-files:
# Default settings
Expand Down
8 changes: 4 additions & 4 deletions iscsi/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ iscsi:
name: iscsi_initiator
text: 'iscsi_initiator_load="YES"'
ctld:
name:
name: ''
text: 'cfiscsi_load="YES"'
ietd:
name: iscsi_trgt
text:
text: ''
lio:
name: target_core_mod
text:
text: ''
fcoe:
name: fcoe_target
text:
text: ''
iser:
name: ('ib_iser', 'ib_isert', 'rdma_ucm', 'rdma_cm', 'ib_cm',)
text: null
Expand Down
6 changes: 3 additions & 3 deletions iscsi/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# vim: ft=sls

include:
{%- if grains.os_family in ('Arch',) %}
{%- if grains.os_family in ('SArch',) %}
{# This sequence avoids /etc/isns/isnsd.conf conflict on Arch #}
- iscsi.target
- iscsi.initiator
- iscsi.target
- iscsi.isns
{%- else %}
{# This is the normal sequence #}
- iscsi.isns
- iscsi.target
- iscsi.initiator
- iscsi.target
{%- endif %}
2 changes: 1 addition & 1 deletion iscsi/initiator/make/clean.sls
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
{%- from tplroot ~ "/map.jinja" import iscsi with context %}
{%- if iscsi.initiator.make.wanted %}
{%- for pkg in iscsi.initiator.make.wanted %}
include:
- {{ sls_service_clean }}
{%- for pkg in iscsi.initiator.make.wanted %}
iscsi-initiator-package-make-clean-{{ pkg }}-removed:
pkg.removed:
Expand Down
2 changes: 1 addition & 1 deletion iscsi/isns/make/clean.sls
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
{%- from tplroot ~ "/map.jinja" import iscsi with context %}
{%- if iscsi.isns.make.wanted %}
{%- for pkg in iscsi.isns.make.wanted %}
include:
- {{ sls_service_clean }}
{%- for pkg in iscsi.isns.make.wanted %}
iscsi-isns-package-make-clean-{{ pkg }}-removed:
pkg.removed:
Expand Down
2 changes: 2 additions & 0 deletions iscsi/oscodename.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,7 @@
## Fedora
# `oscodename` grain has long distro name
{{ fedora_codename('Fedora-29', 29, 'Fedora 29 (Twenty Nine)') }}
{{ fedora_codename('Fedora-30', 30, 'Fedora 30 (Thirty)') }}
{{ fedora_codename('Fedora-31', 31, 'Fedora 31 (Thirty One)') }}

# vim: ft=sls
19 changes: 13 additions & 6 deletions iscsi/osfamilymap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Debian:
- iscsitarget-dkms
- infiniband-diags
- ibutils
- ibverbs-utils #not suse
- rdmacm-utils #not suse
- ibverbs-utils # not suse
- rdmacm-utils # not suse
- perftest
RedHat:
config:
Expand Down Expand Up @@ -103,13 +103,18 @@ Arch:
config:
servicename:
open-iscsi:
- iscsi
- iscsid
- iscsi
- iscsid
kmodule:
lio:
name:
text:
name: ''
text: ''
initiator:
pkgs:
wanted:
- binutils
- fakeroot
- open-iscsi
make:
gitrepo: https://aur.archlinux.org
cmd: makepkg -si --noconfirm -f
Expand All @@ -119,6 +124,8 @@ Arch:
loadmodule: true
pkgs:
wanted:
- binutils
- fakeroot
- linux-lts # For kernel scsi modules
- python-pip # makepkg states needs 'gitpython'.
- thin-provisioning-tools
Expand Down
2 changes: 1 addition & 1 deletion iscsi/osmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Fedora:
provider: tgtd
pkgs:
wanted:
- device-mapper-persistent-data #aka thin-provisioning-tools
- device-mapper-persistent-data # aka thin-provisioning-tools
- netbsd-iscsi
- yum-plugin-versionlock
- targetcli
Expand Down
2 changes: 1 addition & 1 deletion iscsi/target/make/clean.sls
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
{%- from tplroot ~ "/map.jinja" import iscsi with context %}
{%- if iscsi.target.make.wanted %}
{%- for pkg in iscsi.target.make.wanted %}
include:
- {{ sls_service_clean }}
{%- for pkg in iscsi.target.make.wanted %}
iscsi-target-package-make-clean-{{ pkg }}-removed:
pkg.removed:
Expand Down
33 changes: 32 additions & 1 deletion kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,26 @@ suites:
excludes:
- centos-7-2019-2-py3
- arch-base-latest-2019-2-py2
<<<<<<< HEAD
=======
- centos-7-develop-py3
>>>>>>> 863e40c... fix(service): only start service if enabled
provisioner:
dependencies:
- name: lvm
repo: git
source: https://github.com/saltstack-formulas/lvm-formula.git
- name: users # for archlinux
repo: git
source: https://github.com/saltstack-formulas/users-formula.git
state_top:
base:
'*':
- lvm.install
- lvm.files.create
- lvm.pv.create
- iscsi.clean
- iscsi
- iscsi.clean
pillars:
top.sls:
base:
Expand All @@ -221,21 +232,41 @@ suites:
includes:
- centos-7-2019-2-py3
- arch-base-latest-2019-2-py2
<<<<<<< HEAD
provisioner:
=======
- centos-7-develop-py3
provisioner:
dependencies:
- name: lvm
repo: git
source: https://github.com/saltstack-formulas/lvm-formula.git
- name: users # for archlinux
repo: git
source: https://github.com/saltstack-formulas/users-formula.git
>>>>>>> 863e40c... fix(service): only start service if enabled
state_top:
base:
'*':
- users
- lvm.install
- lvm.files.create
- lvm.pv.create
<<<<<<< HEAD
- iscsi.clean
- iscsi
=======
- iscsi
- iscsi.clean
>>>>>>> 863e40c... fix(service): only start service if enabled
pillars:
top.sls:
base:
'*':
- users
- iscsi
pillars_from_files:
users.sls: test/salt/pillar/users.archlinux
iscsi.sls: test/salt/pillar/pillar.travis
verifier:
inspec_tests:
Expand Down
59 changes: 29 additions & 30 deletions pillar.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
{% if grains.os_family in ('Arch',) %}
# iscsi on Archlinux needs a 'iscsimake' user
users:
iscsimake:
sudouser: true
Expand All @@ -13,8 +13,8 @@ users:
- wheel
- root
sudo_rules:
- 'ALL=(ALL) ALL'
{% endif %}
- 'ALL=(ALL) ALL'

lvm:
files:
remove:
Expand Down Expand Up @@ -60,7 +60,7 @@ iscsi:
config:
data:
open-iscsi:
##https://github.com/open-iscsi/open-iscsi/blob/master/etc/iscsid.conf
# https://github.com/open-iscsi/open-iscsi/blob/master/etc/iscsid.conf
node.startup: manual
node.leading_login: 'No'
node.session.timeo.replacement_timeout: 120
Expand All @@ -86,10 +86,10 @@ iscsi:
node.session.iscsi.FastAbort: 'Yes'
node.session.scan: auto

iscsi: ##freeBSD
##https://www.freebsd.org/cgi/man.cgi?query=iscsi.conf&sektion=5&manpath=FreeBSD+10-current
iscsi: # freeBSD
# https://www.freebsd.org/cgi/man.cgi?query=iscsi.conf&sektion=5&manpath=FreeBSD+10-current
node.startup: automatic
myiscsi: ##nickname
myiscsi: # nickname
targetaddress: iscsi1
targetname: 'iqn.1900.com.com:sn.123456'
myiscsi6:
Expand All @@ -100,7 +100,7 @@ iscsi:
targetname: 'iqn.1900.com.com:sn.123456'
initiatorname: 'iqn.2005-01.il.ac.huji.cs:nobody'
authmethod: CHAP
chapiname : 'iqn.2005-01.il.ac.huji.cs:nobody'
chapiname: 'iqn.2005-01.il.ac.huji.cs:nobody'
chapsecret: secretsecret
example01:
targetname: 'iqn.2018-07.com.example.iscsi:example01'
Expand All @@ -118,7 +118,7 @@ iscsi:
chapSecret: secretsecret

ietd:
##http://manpages.ubuntu.com/manpages/trusty/man5/ietd.conf.5.html
# http://manpages.ubuntu.com/manpages/trusty/man5/ietd.conf.5.html
IncomingUser: joe secret
OutgoingUser: jack secret2
'Target iqn.2001-04.com.example:storage.disk2.sys1.xyz':
Expand Down Expand Up @@ -149,7 +149,7 @@ iscsi:
isnsadm: {}
isnsdd: {}
isnsd:
##https://manpages.debian.org/testing/open-isns-server/isnsd.conf.5.en.html
# https://manpages.debian.org/testing/open-isns-server/isnsd.conf.5.en.html
Database: /var/lib/isns
RegistrationPeriod: 10m
DefaultDiscoveryDomain: 1
Expand All @@ -164,14 +164,14 @@ iscsi:
Auth.TimeStampJitter: 1s

tgtd:
##https://linux.die.net/man/5/targets.conf
##https://github.com/fujita/tgt/blob/master/conf/examples/targets.conf.example
# https://linux.die.net/man/5/targets.conf
# https://github.com/fujita/tgt/blob/master/conf/examples/targets.conf.example
include: '/etc/tgt/salt/*.conf'
default-driver: iscsi
#iSNSServerIP: 127.0.0.1
#iSNSServerPort: 3205
#iSNSAccessControl: Off
#iSNS: Off
# iSNSServerIP: 127.0.0.1
# iSNSServerPort: 3205
# iSNSAccessControl: 'Off'
# iSNS: 'Off'
'target iqn.2008-09.com.example:server.target1':
backing-store: /dev/loop0
'target iqn.2008-09.com.example:server.target5':
Expand All @@ -183,23 +183,23 @@ iscsi:
'direct-store /dev/loop2':
vendor_id: VENDOR2
lun: 2
'backing-store /dev/loop3':
'backing-store /dev/loop3':
vendor_id: back1
scsi_sn: SERIAL
write-cache: on
write-cache: 'on'

lio:
##https://www.systutorials.com/docs/linux/man/5-saveconfig.json
##https://bugzilla.redhat.com/show_bug.cgi?id=1643673
##https://github.com/open-iscsi/rtslib-fb/issues/5
##----------------------------------------------------------------------
## The sample below is complex because its used for verification.
## You should only use the minimal pillar data for your needs.
## The format is important so review this example carefully.
##
## Multiple objects are supported:
## See: https://github.com/saltstack-formulas/iscsi-formula/issues/19
##----------------------------------------------------------------------
# https://www.systutorials.com/docs/linux/man/5-saveconfig.json
# https://bugzilla.redhat.com/show_bug.cgi?id=1643673
# https://github.com/open-iscsi/rtslib-fb/issues/5
# ----------------------------------------------------------------------
# The sample below is complex because its used for verification.
# You should only use the minimal pillar data for your needs.
# The format is important so review this example carefully.
#
# Multiple objects are supported:
# See: https://github.com/saltstack-formulas/iscsi-formula/issues/19
# ----------------------------------------------------------------------
fabric_modules:
callmewhateveryoulike0:
discovery_enable_auth: 'true'
Expand Down Expand Up @@ -626,7 +626,6 @@ iscsi:
callmewhateveryoulike0:
attributes:
dataout_timeout: 3
#mapped_luns: {}
parameters:
TargetAlias: LIO Target
portals:
Expand Down
Loading

0 comments on commit 9690093

Please sign in to comment.