From 2b7a7a56246f29a7d910d2f20bfb97206e4c1573 Mon Sep 17 00:00:00 2001 From: Lucas Date: Tue, 7 Apr 2020 04:17:23 -0400 Subject: [PATCH] Updated template. --- .gitignore | 182 ++++++++++++++++++++++++++++++++++++++++++++++++-- .travis.yml | 40 ++++++++--- LICENSE | 2 + meta/main.yml | 12 ++-- 4 files changed, 212 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 59053d4..c888f56 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,176 @@ -.DS_Store -*/**.DS_Store -._* -.*.sw* -*~ -.idea/ -.vscode/ + +# Created by https://www.gitignore.io/api/linux,macos,python,ansible +# Edit at https://www.gitignore.io/?templates=linux,macos,python,ansible + +### Ansible ### *.retry + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don’t work, or not +# install all needed dependencies. +#Pipfile.lock + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# End of https://www.gitignore.io/api/linux,macos,python,ansible \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index ebeda4b..36ac937 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,35 @@ --- - -services: "docker" +language: python +services: docker env: - - distro: "ubuntu1604" - - distro: "ubuntu1804" - - distro: "debian8" - - distro: "debian9" + global: + - ROLE_NAME: cloudflare-acme + matrix: + - MOLECULE_DISTRO: centos7 + - MOLECULE_DISTRO: centos8 + - MOLECULE_DISTRO: ubuntu1804 + - MOLECULE_DISTRO: ubuntu1604 + - MOLECULE_DISTRO: debian9 + - MOLECULE_DISTRO: debian10 + +install: + # Install test dependencies. + - pip install molecule docker testinfra ansible-lint flake8 yamllint + +before_script: + # Use actual Ansible Galaxy role name for the project directory. + - cd ../ + - mv ansible-role-$ROLE_NAME $ROLE_NAME + - cd $ROLE_NAME script: - # Download test shim. - - wget -O ${PWD}/tests/test.sh https://gist.githubusercontent.com/nickjj/d12353b5b601e33cd62fda111359957a/raw - - chmod +x ${PWD}/tests/test.sh + - molecule --version + - ansible --version + - molecule test - # Run tests. - - ${PWD}/tests/test.sh +notifications: + webhooks: + urls: + - "https://galaxy.ansible.com/api/v1/notifications/" + on_success: change diff --git a/LICENSE b/LICENSE index c25a72d..c839806 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,8 @@ The MIT License (MIT) Copyright (c) 2018 Nick Janetakis nick.janetakis@gmail.com +Copyright (C) 2019 Sonic + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/meta/main.yml b/meta/main.yml index 135b2fc..f77b6bb 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,11 +1,10 @@ --- - galaxy_info: - role_name: "acme_sh" - author: "Nick Janetakis" - description: "Install and auto-renew SSL certificates with Let's Encrypt using acme.sh." - license: "license (MIT)" - min_ansible_version: 2.5 + role_name: cloudflare-acme + author: sonic + description: Install and renew SSL certificates with Cloudflare API ; Let's Encrypt ; and acme.sh. + license: MIT + min_ansible_version: 2.9 platforms: - name: "Ubuntu" @@ -22,6 +21,7 @@ galaxy_info: - "https" - "letsencrypt" - "networking" + - "cloudflare" - "security" - "ssl" - "system"