Skip to content

Commit

Permalink
Merge pull request #31 from jordiprats/master
Browse files Browse the repository at this point in the history
debian support
  • Loading branch information
jordiprats authored Jun 8, 2020
2 parents df98a1a + 5e8fdbd commit 53cfab4
Show file tree
Hide file tree
Showing 6 changed files with 151 additions and 10 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/puppet-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: puppet-lint

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
with:
ruby-version: 2.6

- name: Install dependencies
run: bundle install

- name: Run tests
run: bundle exec rake

# Runs a single command using the runners shell
- name: puppet-lint
run: bundle exec rake lint
39 changes: 39 additions & 0 deletions .github/workflows/puppet-metadata-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: puppet-metadata-lint

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
with:
ruby-version: 2.6

- name: Install dependencies
run: bundle install

- name: Run tests
run: bundle exec rake

# Runs a single command using the runners shell
- name: puppet-lint
run: bundle exec rake metadata_lint
39 changes: 39 additions & 0 deletions .github/workflows/puppet-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: puppet-validate

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
with:
ruby-version: 2.6

- name: Install dependencies
run: bundle install

- name: Run tests
run: bundle exec rake

# Runs a single command using the runners shell
- name: puppet-lint
run: bundle exec rake validate
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 0.1.35

* added support for Debian 8, 9 and 10

## 0.1.34

* added sudo configtest on refresh
Expand Down
30 changes: 21 additions & 9 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,33 @@
{
case $::operatingsystem
{
'Ubuntu':
{
case $::operatingsystemrelease
'Ubuntu':
{
/^1[468].*$/:
case $::operatingsystemrelease
{
/^1[468].*$/:
{
}
/^20.*$/:
{
}
default: { fail("Unsupported Ubuntu version! - ${::operatingsystemrelease}") }
}
/^20.*$/:
}
'Debian':
{
case $::operatingsystemrelease
{
/^[89].*$/:
{
}
/^10.*$/:
{
}
default: { fail("Unsupported Debian version! - ${::operatingsystemrelease}") }
}
default: { fail("Unsupported Ubuntu version! - ${::operatingsystemrelease}") }
}
}
'Debian': { fail('Unsupported') }
default: { fail('Unsupported Debian flavour!') }
default: { fail('Unsupported Debian flavour!') }
}
}
'Suse':
Expand Down
10 changes: 9 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eyp-sudoers",
"version": "0.1.34",
"version": "0.1.35",
"author": "eyp",
"summary": "manages sudoers",
"license": "Apache-2.0",
Expand Down Expand Up @@ -35,6 +35,14 @@
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [ "14.04", "16.04", "18.04", "20.04" ]
},
{
"operatingsystem": "Debian",
"operatingsystemrelease": [ "8", "9", "10" ]
},
{
"operatingsystem": "Raspbian",
"operatingsystemrelease": [ "10" ]
},
{
"operatingsystem": "SLES",
"operatingsystemrelease": [ "11.3", "12.3", "12.4" ]
Expand Down

0 comments on commit 53cfab4

Please sign in to comment.