-
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
1 parent
bb55fbd
commit 226eda4
Showing
28 changed files
with
510 additions
and
9 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
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 |
---|---|---|
@@ -1,2 +1,47 @@ | ||
# ansible-msodbcsql | ||
Ansible role to set up msodbcsql in Debian-like systems | ||
## msodbcsql | ||
|
||
[![CI](https://github.com/Oefenweb/ansible-msodbcsql/workflows/CI/badge.svg)](https://github.com/Oefenweb/ansible-msodbcsql/actions?query=workflow%3ACI) | ||
[![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-git--lfs-blue.svg)](https://galaxy.ansible.com/Oefenweb/msodbcsql) | ||
|
||
Set up [Microsoft ODBC](https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16) in Debian-like systems. | ||
|
||
#### Requirements | ||
|
||
* `software-properties-common` (will be installed) | ||
* `dirmngr` (will be installed) | ||
* `apt-transport-https` (will be installed) | ||
* `wget` (will be installed) | ||
|
||
#### Variables | ||
|
||
* `msodbcsql_version`: [default: `18`]: Version to install (e.g. `17`) | ||
* `msodbcsql_install`: [default: `[]`]: Additional packages to install (e.g. `mssql-tools`) | ||
|
||
## Dependencies | ||
|
||
None | ||
|
||
## Recommended | ||
|
||
None | ||
|
||
#### Example | ||
|
||
```yaml | ||
--- | ||
- hosts: all | ||
roles: | ||
- oefenweb.msodbcsql | ||
``` | ||
#### License | ||
MIT | ||
#### Author Information | ||
Mischa ter Smitten | ||
#### Feedback, bug-reports, requests, ... | ||
Are [welcome](https://github.com/Oefenweb/ansible-msodbcsql/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,4 @@ | ||
# defaults file | ||
--- | ||
msodbcsql_version: 18 | ||
msodbcsql_install: [] |
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,25 @@ | ||
# meta file | ||
--- | ||
galaxy_info: | ||
author: oefenweb | ||
role_name: msodbcsql | ||
company: Oefenweb.nl B.V. | ||
description: Set up Microsoft ODBC 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 | ||
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 |
Oops, something went wrong.