Skip to content

Commit

Permalink
Merge pull request #16 from jordiprats/master
Browse files Browse the repository at this point in the history
workflows ubuntu 20 i debian 20
  • Loading branch information
jordiprats authored May 17, 2020
2 parents 6c018cc + c43bb1a commit 06a3301
Show file tree
Hide file tree
Showing 6 changed files with 155 additions and 7 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
13 changes: 9 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
# CHANGELOG

# 0.1.17

* Added **Ubuntu 20.04** support
* Added **Debian 10** support

# 0.1.16

* SLES 12.4 support
* Added **SLES 12.4** support

# 0.1.15

* SLES 12.3 support
* Added **SLES 12.3** support

# 0.1.14

* Ubuntu 18.04 support
* Added **Ubuntu 18.04** support

# 0.1.13

* Ubuntu 16.04 support
* Added **Ubuntu 16.04** support
20 changes: 19 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,28 @@
$apparmor_dir = '/etc/apparmor.d'
$default_mode='disable'
}
/^20.*/:
{
$apparmor_dir = '/etc/apparmor.d'
$default_mode='disable'
}
default: { fail("Unsupported Ubuntu version! - ${::operatingsystemrelease}") }
}
}
'Debian': { fail('Unsupported') }
'Debian':
{
'Ubuntu':
{
case $::operatingsystemrelease
{
/^10.*/:
{
$apparmor_dir = '/etc/apparmor.d'
$default_mode='disable'
}
default: { fail("Unsupported Debian version! - ${::operatingsystemrelease}") }
}
}
default: { fail('Unsupported Debian flavour!') }
}
}
Expand Down
12 changes: 10 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eyp-apparmor",
"version": "0.1.16",
"version": "0.1.17",
"author": "eyp",
"summary": "manages apparmor",
"license": "Apache-2.0",
Expand All @@ -13,7 +13,15 @@
"operatingsystem_support": [
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [ "14.04", "16.04", "18.04" ]
"operatingsystemrelease": [ "14.04", "16.04", "18.04", "20.04" ]
},
{
"operatingsystem": "Debian",
"operatingsystemrelease": [ "10" ]
},
{
"operatingsystem": "Raspbian",
"operatingsystemrelease": [ "10" ]
},
{
"operatingsystem": "SLES",
Expand Down

0 comments on commit 06a3301

Please sign in to comment.