Skip to content

Commit

Permalink
Merge pull request #10 from jobscore/add_support_focal
Browse files Browse the repository at this point in the history
Add support for focal and drop xenial
  • Loading branch information
GlauberrBatista authored Jan 31, 2022
2 parents 512aaef + 263834e commit cee0953
Show file tree
Hide file tree
Showing 9 changed files with 443 additions and 471 deletions.
21 changes: 13 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
---
language: python
services: docker

python:
- '3.9'

os: linux
dist: focal

install:
- pip install pipenv
- pipenv install
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >ansible.cfg
- pipenv install

script:
- pipenv run molecule test
- pipenv run molecule test

notifications:
email: false
webhooks: https://galaxy.ansible.com/api/v1/notifications/
slack:
rooms:
secure: SOyPCTmHDBHbgFmEpQjZVFa2gd7G8cv6J6S2606MJJOsTPES4mpNRdOczW9Mu4Lpfi7H2QVLsrqfC/tthftjDxUwoV1KAkZnXlp8wKRQlpoRrE20ViGdh8Awe9dnjb0MaNjusMTbGgaTARqLAk44e9tCYRA+rnmI1xJpA0ugDoWYYrhWcMZWV52BzDCM50cc4YbUlzKPLHUntenZocEnktSPRsy0nOBtUo/bB2nNL9WqGgP1qV3ONYUdcI1ua3KjWsEFX/ZJLiiJZB12xL7mowS8FI6X4jZAb9ZccJmZX0ieSD8Mf3kgOrzHYpK2IioDaQxdqUMCpdsR8pMlgaI8Co3CXzDiyaamCjJfULM7zOMKj+ngwKoli0pBWRuhy129Zdtw58TUXlVLn/01F3z5ZpIn1Nl5HYY+dl7spDpYnJVAfJS7KZPKH3iGSWFHcJN2XiFq0qab6cttlbeiG7+VQMp5QiRj+jozDez/zpZ0KVe+jPAKyevi7WBmB2OShk9mb/6Mb8jHopYDH31uxz3oaPWrqqKE+F3OB855JLWZhmterLFNDEwiE6Q25VzoeOx5Fk69rCFBCvD4dj+1nJpVCRNkcJCFwshN0KpQAA1JddTUmKeHiRX2gu3Uok4xcOOHnFformyoeyXA+kDYyVeqBMEB9JAFcriRScdM3nqFQBk=
5 changes: 1 addition & 4 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
extends: default

ignore: |
molecule/
.travis.yml


rules:
braces:
max-spaces-inside: 1
Expand All @@ -13,6 +13,3 @@ rules:
max-spaces-inside: 1
level: error
line-length: disable
# NOTE(retr0h): Templates no longer fail this lint rule.
# Uncomment if running old Molecule templates.
# truthy: disable
14 changes: 8 additions & 6 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
name = "pypi"

[packages]
ansible = "*"
molecule = "*"
docker-py = "*"
molecule-docker = "*"
pytest-testinfra = "*"
yamllint = "*"
'molecule[docker]' = "*"

[dev-packages]

[requires]
python_version = "2.7"
python_version = "3.9"
852 changes: 411 additions & 441 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ galaxy_info:
- name: Ubuntu
versions:
- bionic
- xenial
- focal
galaxy_tags:
- ruby
- passenger
Expand Down
File renamed without changes.
7 changes: 5 additions & 2 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ dependency:
name: galaxy
driver:
name: docker
lint:
name: yamllint
lint: |
set -e
yamllint .
platforms:
- name: bionic
image: ubuntu:bionic
- name: focal
image: ubuntu:focal
provisioner:
name: ansible
lint:
Expand Down
5 changes: 3 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
state: present
update_cache: true

- name: Ensure Nginx and Passenger are present
- name: Ensure Nginx and Passenger are present (Bionic +)
apt:
name:
- nginx-extras
- nginx
- libnginx-mod-http-passenger
- libnginx-mod-http-headers-more-filter
state: present

- name: Ensure passenger module is enabled
Expand Down
8 changes: 1 addition & 7 deletions templates/nginx.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ user {{ nginx_user }};
worker_processes {{ nginx_worker_processes }};
pid /run/nginx.pid;

{% if ansible_distribution_release == 'bionic' %}
include /etc/nginx/modules-enabled/*.conf;
{% endif %}

{{ nginx_extra_config }}

Expand Down Expand Up @@ -38,7 +36,7 @@ http {
# SSL Settings
##

ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;

##
Expand All @@ -52,10 +50,6 @@ http {
# Gzip Settings
##

{% if ansible_distribution_release != 'bionic' %}
{% include 'mod-http-passenger.conf.j2' %}
{% endif %}

gzip on;
gzip_disable "msie6";

Expand Down

0 comments on commit cee0953

Please sign in to comment.