Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Tcharl committed Dec 20, 2023
0 parents commit ccd5c30
Show file tree
Hide file tree
Showing 42 changed files with 2,431 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
exclude_paths:
- .cache/
- meta/
- molecule/
- .tox
skip_list:
- '106' # Role name {} does not match ``^[a-z][a-z0-9_]+$`` pattern
- experimental # all rules tagged as experimental
- galaxy[no-changelog]
32 changes: 32 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name-template: "v$RESOLVED_VERSION 🌈"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: "🚀 Features"
labels:
- "feature"
- "enhancement"
- title: "🐛 Bug Fixes"
labels:
- "fix"
- "bugfix"
- "bug"
- title: "🧰 Maintenance"
label: "chore"
- title: "🧺 Miscellaneous" #Everything except ABAP
label: "misc"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- "major"
minor:
labels:
- "minor"
patch:
labels:
- "patch"
default: patch
template: |
## Changes
$CHANGES
77 changes: 77 additions & 0 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
# This is a basic workflow to help you get started with Actions
name: Molecule

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

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
requirements:
# 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@v3
with:
path: tcharl.ansible_routing
- name: install prereq
run: |
cd tcharl.ansible_routing
ansible-galaxy role install -r requirements-standalone.yml
ansible-galaxy collection install -r requirements-collections.yml
lint:
# 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@v3
with:
path: tcharl.ansible_routing
- name: update apt
run: |
sudo apt update
- name: install aptitude packages
run: |
sudo apt -y install sudo python3 python3-pip
- name: pip install packages
run: |
pip3 install wheel setuptools tox
- name: tox lint
run: |
cd tcharl.ansible_routing
tox -e lint
test:
# 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@v3
with:
path: tcharl.ansible_routing
- name: update apt
run: |
sudo apt update
# - name: apt upgrade
# run: |
# sudo apt upgrade
- name: install aptitude packages
run: |
sudo apt -y install sudo python3 python3-pip podman
- name: pip install packages
run: |
pip3 install wheel setuptools tox
- name: Test with podman
run: |
cd tcharl.ansible_routing
tox -e test-exec
17 changes: 17 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- main
- master

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/release-galaxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Ansible Galaxy
on:
push:
branches:
- main
- master
release:
types:
- published

jobs:
galaxy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Trigger a new import on Galaxy.
run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.idea
**/__pychache__
.cache
.tox
build
35 changes: 35 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
# Based on ansible-lint config
extends: default
ignore: |
.cache
.tox
rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
colons:
max-spaces-after: -1
level: error
commas:
max-spaces-after: -1
level: error
comments: disable
comments-indentation: disable
document-start: disable
empty-lines:
max: 3
level: error
hyphens:
level: error
indentation: disable
key-duplicates: enable
line-length: disable
new-line-at-end-of-file: disable
new-lines:
type: unix
trailing-spaces: disable
truthy: disable
13 changes: 13 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2020 Charlie Mordant

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Routing
=========

* Galaxy: [![Ansible Galaxy](https://img.shields.io/badge/galaxy-tcharl.ansible_routing-660198.svg?style=flat)](https://galaxy.ansible.com/tcharl/ansible_routing)
* Lint & Tests: ![Molecule](https://github.com/OsgiliathEnterprise/ansible-routing/workflows/Molecule/badge.svg)
* Chat: [![Join the chat at https://gitter.im/OsgiliathEnterprise/platform](https://badges.gitter.im/OsgiliathEnterprise/platform.svg)](https://gitter.im/OsgiliathEnterprise/platform?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

This role let you configure simple port or port/IP redirections using firewalld masquerade

Requirements
------------

Ansible :-), but also some [collections](./requirements-collections.yml) and some [roles](./requirements.yml)

Role Variables
--------------

```
firewalld_zones:
- name: public # optional
nics: # optional, will take all the network interfaces of the machine by default
- eth0 # optional
masquerade: true
port_forward_rules:
- port_forward_rule: ssh-to-guest-ip
family: ipv4 # optional
from_port: 6752
protocol: tcp # optional
to_address: 192.168.1.10
to_port: 22
- port_forward_rule: ssh-to-ansible-host-forward
family: ipv4 # optional
from_port: 6754
protocol: tcp # optional
to_host: myhost.osgiliath.test
to_port: 22
enabled_services:
- service: ssh
enabled_ports:
- port: 6753
protocol: tcp
enabled_port_ranges:
- port_range: 6753-7000
protocol: tcp
```

License
-------

[Apache-2](https://www.apache.org/licenses/LICENSE-2.0)

Author Information
------------------

* Twitter [@tcharl](https://twitter.com/Tcharl)
* Github [@tcharl](https://github.com/Tcharl)
* LinkedIn [Charlie Mordant](https://www.linkedin.com/in/charlie-mordant-51796a97/)
5 changes: 5 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---

firewalld_become: true
standalone_role: True
firewalld_default_zone: public
8 changes: 8 additions & 0 deletions files/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<html>
<head>
<title>Example</title>
</head>
<body>
<p>This is an example of a simple HTML page with one paragraph.</p>
</body>
</html>
2 changes: 2 additions & 0 deletions files/vhost
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
client_max_body_size 0;
chunked_transfer_encoding on;
21 changes: 21 additions & 0 deletions galaxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
namespace: "tcharl"
name: "ansible_routing"
version: "1.0.1"
description: "Lets you configure simple port or port/IP redirections using firewalld masquerade"

authors:
- "Charlie Mordant <[email protected]>"

repository: "https://github.com/OsgiliathEnterprise/ansible_routing"
documentation: "https://github.com/OsgiliathEnterprise/ansible_routing/blob/master/README.md"
homepage: "https://github.com/OsgiliathEnterprise/ansible_routing"
issues: "https://github.com/OsgiliathEnterprise/ansible_routing/issues"

readme: "README.md"
license:
- "Apache-2.0"
tags:
- "firewalld"
- "rich-rules"
- "linux"
16 changes: 16 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
# handlers file for ansible-routing

- name: Handler | reload-firewall
ansible.builtin.service:
name: firewalld
state: reloaded
become: yes
listen: ansible-routing | handler | reload-firewall

- name: Handler | restart-firewall
ansible.builtin.service:
name: firewalld
state: restarted
become: yes
listen: ansible-routing | restart | restart-firewall
2 changes: 2 additions & 0 deletions meta/.galaxy_install_info
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
install_date: Sat Aug 19 16:48:59 2023
version: v2.0.3
2 changes: 2 additions & 0 deletions meta/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
if __name__ == "__main__":
exit(0)
Loading

0 comments on commit ccd5c30

Please sign in to comment.