-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d1d1545
Showing
27 changed files
with
486 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
warn_list: | ||
- role-name | ||
- name[play] | ||
- name[casing] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
name: CI | ||
'on': | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: '30 1 * * 3' | ||
|
||
jobs: | ||
|
||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the codebase | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install test dependencies | ||
run: | | ||
pip install ansible-lint | ||
ansible-galaxy install -r requirements.yml | ||
- name: Lint code | ||
run: | | ||
yamllint . | ||
ansible-lint | ||
molecule: | ||
name: Molecule | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: "${{ github.repository }}" | ||
needs: | ||
- lint | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- distro: debian10 | ||
ansible-version: '>=9, <10' | ||
- distro: debian11 | ||
- distro: debian12 | ||
- distro: ubuntu1804 | ||
ansible-version: '>=9, <10' | ||
- distro: ubuntu2004 | ||
- distro: ubuntu2204 | ||
- distro: ubuntu2404 | ||
|
||
steps: | ||
- name: Check out the codebase | ||
uses: actions/checkout@v3 | ||
with: | ||
path: "${{ github.repository }}" | ||
|
||
- name: Set up Python 3 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install test dependencies | ||
run: | | ||
pip install 'ansible${{ matrix.ansible-version }}' molecule-plugins[docker] docker | ||
- name: Run Molecule tests | ||
run: | | ||
molecule test | ||
env: | ||
ANSIBLE_FORCE_COLOR: '1' | ||
ANSIBLE_VERBOSITY: '2' | ||
MOLECULE_DEBUG: '1' | ||
MOLECULE_DISTRO: "${{ matrix.distro }}" | ||
PY_COLORS: '1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Release | ||
'on': | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
|
||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the codebase | ||
uses: actions/checkout@v3 | ||
|
||
- name: Publish to Galaxy | ||
uses: robertdebock/[email protected] | ||
with: | ||
galaxy_api_key: ${{ secrets.GALAXY_API_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# OS generated files # | ||
###################### | ||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
Icon? | ||
ehthumbs.db | ||
Thumbs.db | ||
|
||
# IDE files # | ||
################# | ||
/.settings | ||
/.buildpath | ||
/.project | ||
/nbproject | ||
*.komodoproject | ||
*.kpf | ||
/.idea | ||
|
||
# Vagrant files # | ||
.virtualbox/ | ||
.vagrant/ | ||
vagrant_ansible_inventory_* | ||
ansible.cfg | ||
|
||
# Other files # | ||
############### | ||
!empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
extends: default | ||
|
||
rules: | ||
braces: | ||
max-spaces-inside: 1 | ||
level: error | ||
brackets: | ||
max-spaces-inside: 1 | ||
level: error | ||
line-length: disable | ||
truthy: disable | ||
|
||
ignore: | | ||
.tox/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM ubuntu:18.04 | ||
MAINTAINER Mischa ter Smitten <[email protected]> | ||
|
||
ENV LANG C.UTF-8 | ||
ENV LC_ALL C.UTF-8 | ||
|
||
# python | ||
RUN apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y python3-minimal python3-dev curl && \ | ||
apt-get clean | ||
RUN curl -sL https://bootstrap.pypa.io/pip/3.6/get-pip.py | python3 - | ||
RUN rm -rf $HOME/.cache | ||
|
||
# ansible | ||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python3-apt && \ | ||
apt-get clean | ||
RUN pip3 install ansible==2.10.7 | ||
RUN rm -rf $HOME/.cache | ||
|
||
# provision | ||
COPY . /etc/ansible/roles/ansible-role | ||
WORKDIR /etc/ansible/roles/ansible-role | ||
RUN ansible-playbook -i tests/inventory tests/test.yml --connection=local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (c) Oefenweb.nl <https://github.com/Oefenweb> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is furnished | ||
to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
## spotify | ||
|
||
[![CI](https://github.com/Oefenweb/ansible-spotify/workflows/CI/badge.svg)](https://github.com/Oefenweb/ansible-spotify/actions?query=workflow%3ACI) | ||
[![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-spotify-blue.svg)](https://galaxy.ansible.com/Oefenweb/spotify/) | ||
|
||
Set up [Spotify](https://www.spotify.com) in Debian-like systems. | ||
|
||
#### Requirements | ||
|
||
* `software-properties-common` (will be installed) | ||
* `dirmngr` (will be installed) | ||
|
||
#### Variables | ||
|
||
None | ||
|
||
## Dependencies | ||
|
||
None | ||
|
||
#### Example | ||
|
||
```yaml | ||
--- | ||
- hosts: all | ||
roles: | ||
- oefenweb.spotify | ||
``` | ||
#### License | ||
MIT | ||
#### Author Information | ||
Mischa ter Smitten | ||
#### Feedback, bug-reports, requests, ... | ||
Are [welcome](https://github.com/Oefenweb/ansible-spotify/issues)! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby ts=2 sw=2 tw=0 et : | ||
|
||
role = File.basename(File.expand_path(File.dirname(__FILE__))) | ||
|
||
boxes = [ | ||
{ | ||
:name => "ubuntu-1804", | ||
:box => "bento/ubuntu-18.04", | ||
:ip => '10.0.0.13', | ||
:cpu => "50", | ||
:ram => "384" | ||
}, | ||
{ | ||
:name => "ubuntu-2004", | ||
:box => "bento/ubuntu-20.04", | ||
:ip => '10.0.0.14', | ||
:cpu => "50", | ||
:ram => "512" | ||
}, | ||
{ | ||
:name => "ubuntu-2204", | ||
:box => "bento/ubuntu-22.04", | ||
:ip => '10.0.0.15', | ||
:cpu => "50", | ||
:ram => "512" | ||
}, | ||
{ | ||
:name => "ubuntu-2404", | ||
:box => "bento/ubuntu-24.04", | ||
:ip => '10.0.0.16', | ||
:cpu => "50", | ||
:ram => "512" | ||
}, | ||
{ | ||
:name => "debian-10", | ||
:box => "bento/debian-10", | ||
:ip => '10.0.0.18', | ||
:cpu => "50", | ||
:ram => "256" | ||
}, | ||
{ | ||
:name => "debian-11", | ||
:box => "bento/debian-11", | ||
:ip => '10.0.0.19', | ||
:cpu => "50", | ||
:ram => "256" | ||
}, | ||
{ | ||
:name => "debian-12", | ||
:box => "bento/debian-12", | ||
:ip => '10.0.0.20', | ||
:cpu => "50", | ||
:ram => "384" | ||
}, | ||
] | ||
|
||
Vagrant.configure("2") do |config| | ||
boxes.each do |box| | ||
config.vm.define box[:name] do |vms| | ||
vms.vm.box = box[:box] | ||
vms.vm.hostname = "ansible-#{role}-#{box[:name]}" | ||
|
||
vms.vm.provider "virtualbox" do |v| | ||
v.customize ["modifyvm", :id, "--cpuexecutioncap", box[:cpu]] | ||
v.customize ["modifyvm", :id, "--memory", box[:ram]] | ||
end | ||
|
||
vms.vm.network :private_network, ip: box[:ip] | ||
|
||
vms.vm.provision :ansible do |ansible| | ||
ansible.playbook = "tests/vagrant.yml" | ||
ansible.verbose = "vv" | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# defaults file | ||
--- |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# handlers file | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# meta file | ||
--- | ||
galaxy_info: | ||
author: oefenweb | ||
role_name: spotify | ||
company: Oefenweb.nl B.V. | ||
description: Set up Insync in Debian-like systems | ||
license: MIT | ||
min_ansible_version: 2.10.0 | ||
platforms: | ||
- name: Ubuntu | ||
versions: | ||
- bionic | ||
- focal | ||
- jammy | ||
- noble | ||
- name: Debian | ||
versions: | ||
- buster | ||
- bullseye | ||
- bookworm | ||
galaxy_tags: | ||
- development | ||
- system | ||
- networking | ||
- sync | ||
dependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
collections: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
become: true | ||
roles: | ||
- ../../../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
driver: | ||
name: docker | ||
platforms: | ||
- name: instance | ||
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest" | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:rw | ||
- /var/lib/containerd | ||
cgroupns_mode: host | ||
privileged: true | ||
pre_build_image: true | ||
provisioner: | ||
name: ansible | ||
playbooks: | ||
prepare: prepare.yml | ||
converge: converge.yml | ||
verify: verify.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
- name: Prepare | ||
hosts: all | ||
become: true | ||
tasks: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
- name: Verify | ||
hosts: all | ||
become: true | ||
tasks: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# requirements file | ||
--- | ||
collections: [] |
Oops, something went wrong.