-
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
Showing
42 changed files
with
1,035 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,8 @@ | ||
exclude_paths: | ||
- ./box-example | ||
parseable: true | ||
quiet: true | ||
skip_list: | ||
- skip_linting | ||
use_default_rules: true | ||
verbosity: 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,8 @@ | ||
box-example/roles | ||
*.retry | ||
tempfile | ||
local*.sh | ||
.idea | ||
__pycache__/ | ||
**/*/__pycache__ | ||
*.pyc |
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,105 @@ | ||
--- | ||
sudo: required | ||
|
||
env: | ||
- distribution='ubuntu' | ||
version='14.04' | ||
init='/sbin/init' | ||
run_opts='' | ||
playbook='test.yml' | ||
- distribution='ubuntu' | ||
version='16.04' | ||
init='/sbin/init' | ||
run_opts='--security-opt seccomp=unconfined --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro' | ||
playbook='test.yml' | ||
- distribution='ubuntu' | ||
version='18.04' | ||
init='/sbin/init' | ||
run_opts='--security-opt seccomp=unconfined --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro' | ||
playbook='test.yml' | ||
# - distribution='fedora' | ||
# version='25' | ||
# init='/usr/sbin/init' | ||
# run_opts='--security-opt seccomp=unconfined --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro' | ||
# playbook='test.yml' | ||
# - distribution='fedora' | ||
# version='26' | ||
# init='/usr/sbin/init' | ||
# run_opts='--security-opt seccomp=unconfined --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro' | ||
# playbook='test.yml' | ||
# - distribution='fedora' | ||
# version='27' | ||
# init='/usr/sbin/init' | ||
# run_opts='--security-opt seccomp=unconfined --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro' | ||
# playbook='test.yml' | ||
# - distribution='fedora' | ||
# version='28' | ||
# init='/usr/sbin/init' | ||
# run_opts='--security-opt seccomp=unconfined --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro' | ||
# playbook='test.yml' | ||
# - distribution='centos' | ||
# version='7' | ||
# init='/usr/lib/systemd/systemd' | ||
# run_opts='--privileged' | ||
# playbook='test.yml' | ||
# - distribution: alpine | ||
# version: 3.4 | ||
# init: /sbin/init | ||
# playbook: test.yml | ||
# - distribution: alpine | ||
# version: 3.5 | ||
# init: /sbin/init | ||
# playbook: test.yml | ||
# - distribution: alpine | ||
# version: 3.6 | ||
# init: /sbin/init | ||
# playbook: test.yml | ||
# - distribution: alpine | ||
# version: 3.7 | ||
# init: /sbin/init | ||
# playbook: test.yml | ||
|
||
# whitelist | ||
branches: | ||
only: | ||
- master | ||
- develop | ||
|
||
services: | ||
- docker | ||
|
||
before_install: | ||
# Pull container | ||
- 'sudo docker pull ${distribution}:${version}' | ||
# Customize container | ||
- 'sudo docker build --rm=true --file=tests/Dockerfile.${distribution}-${version} --tag=${distribution}-${version}:ansible tests' | ||
- 'sudo docker run --rm --privileged -v /:/host ${distribution}-${version}:ansible setup || true' | ||
- 'sudo mkdir -p /tmp/cgroup/systemd && sudo mount -t cgroup systemd /tmp/cgroup/systemd -o ro,noexec,nosuid,nodev,none,name=systemd' | ||
|
||
script: | ||
- container_id=$(mktemp) | ||
# Run container in detached state | ||
- 'echo sudo docker run --detach --volume="${PWD}":/etc/ansible/roles/role_under_test:ro ${run_opts} -t ${distribution}-${version}:ansible "${init}"' | ||
- 'sudo docker run --detach --volume="${PWD}":/etc/ansible/roles/role_under_test:ro ${run_opts} -t ${distribution}-${version}:ansible "${init}" > "${container_id}"' | ||
# Ansible syntax check. | ||
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-playbook /etc/ansible/roles/role_under_test/tests/${playbook} --syntax-check' | ||
|
||
# Ansible linting | ||
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-lint -c /etc/ansible/roles/role_under_test/.ansible-lint /etc/ansible/roles/role_under_test || true' | ||
|
||
|
||
# Test role. | ||
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-playbook /etc/ansible/roles/role_under_test/tests/${playbook}' | ||
|
||
# Test role idempotence. | ||
- > | ||
sudo docker exec "$(cat ${container_id})" ansible-playbook /etc/ansible/roles/role_under_test/tests/${playbook} | ||
| grep -q 'unreachable=0.*failed=0' | ||
&& (echo 'Idempotence test: pass' && exit 0) | ||
|| (echo 'Idempotence test: fail' && exit 1) | ||
# Clean up | ||
- sudo docker stop "$(cat ${container_id})" | ||
|
||
notifications: | ||
webhooks: https://galaxy.ansible.com/api/v1/notifications/ |
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,70 @@ | ||
sa-acme-sh | ||
========== | ||
|
||
[![Build Status](https://travis-ci.com/softasap/sa-acme-sh.svg?branch=master)](https://travis-ci.com/softasap/sa-acme-sh) | ||
|
||
|
||
Example of usage: | ||
|
||
Simple | ||
|
||
```YAML | ||
|
||
- { | ||
role: "sa-acme-sh" | ||
} | ||
|
||
|
||
``` | ||
|
||
Advanced | ||
|
||
```YAML | ||
|
||
- { | ||
role: "sa-acme-sh", | ||
} | ||
|
||
|
||
``` | ||
|
||
|
||
|
||
Usage with ansible galaxy workflow | ||
---------------------------------- | ||
|
||
If you installed the `sa-acme-sh` role using the command | ||
|
||
|
||
` | ||
ansible-galaxy install softasap.sa-acme-sh | ||
` | ||
|
||
the role will be available in the folder `library/softasap.sa-acme-sh` | ||
Please adjust the path accordingly. | ||
|
||
```YAML | ||
|
||
- { | ||
role: "softasap.sa-acme-sh" | ||
} | ||
|
||
``` | ||
|
||
|
||
|
||
|
||
Copyright and license | ||
--------------------- | ||
|
||
Code is dual licensed under the [BSD 3 clause] (https://opensource.org/licenses/BSD-3-Clause) and the [MIT License] (http://opensource.org/licenses/MIT). Choose the one that suits you best. | ||
|
||
Reach us: | ||
|
||
Subscribe for roles updates at [FB] (https://www.facebook.com/SoftAsap/) | ||
|
||
Join gitter discussion channel at [Gitter](https://gitter.im/softasap) | ||
|
||
Discover other roles at http://www.softasap.com/roles/registry_generated.html | ||
|
||
visit our blog at http://www.softasap.com/blog/archive.html |
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,36 @@ | ||
--- | ||
# defaults file for sa-acme-sh | ||
|
||
# defaults file for sa-dehydrated | ||
|
||
role_dir: "{{role_path}}" | ||
|
||
# Installation directory | ||
le_base_install_dir: /opt | ||
le_install_dir: "{{ le_base_install_dir }}/letsencrypt/" | ||
le_wellknown_path: "/var/www/.well-known/acme-challenge" | ||
|
||
acmesh_version: 2.8.0 | ||
|
||
le_overrides: | ||
- apache | ||
- nginx | ||
- haproxy | ||
|
||
# Let's Encrypt CA URL | ||
#le_ca: "https://acme-staging-v02.api.letsencrypt.org/directory" | ||
|
||
# Setup crob job | ||
option_setup_cron: true | ||
# Force certificates generation | ||
option_run_once: true | ||
# Leave prolongation endpoint website | ||
option_leave_prolongation_endpoint: false | ||
|
||
# Domain list | ||
le_domains: | ||
- { | ||
names: "voronenko.net www.voronenko.net", | ||
nginx_config: "/etc/nginx/sites-available/voronenko_net" | ||
} | ||
|
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 for sa-acme-sh |
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,60 @@ | ||
galaxy_info: | ||
author: your name | ||
description: your description | ||
company: your company (optional) | ||
|
||
# If the issue tracker for your role is not on github, uncomment the | ||
# next line and provide a value | ||
# issue_tracker_url: http://example.com/issue/tracker | ||
|
||
# Some suggested licenses: | ||
# - BSD (default) | ||
# - MIT | ||
# - GPLv2 | ||
# - GPLv3 | ||
# - Apache | ||
# - CC-BY | ||
license: license (GPLv2, CC-BY, etc) | ||
|
||
min_ansible_version: 2.4 | ||
|
||
# If this a Container Enabled role, provide the minimum Ansible Container version. | ||
# min_ansible_container_version: | ||
|
||
# Optionally specify the branch Galaxy will use when accessing the GitHub | ||
# repo for this role. During role install, if no tags are available, | ||
# Galaxy will use this branch. During import Galaxy will access files on | ||
# this branch. If Travis integration is configured, only notifications for this | ||
# branch will be accepted. Otherwise, in all cases, the repo's default branch | ||
# (usually master) will be used. | ||
#github_branch: | ||
|
||
# | ||
# Provide a list of supported platforms, and for each platform a list of versions. | ||
# If you don't wish to enumerate all versions for a particular platform, use 'all'. | ||
# To view available platforms and versions (or releases), visit: | ||
# https://galaxy.ansible.com/api/v1/platforms/ | ||
# | ||
# platforms: | ||
# - name: Fedora | ||
# versions: | ||
# - all | ||
# - 25 | ||
# - name: SomePlatform | ||
# versions: | ||
# - all | ||
# - 1.0 | ||
# - 7 | ||
# - 99.99 | ||
|
||
galaxy_tags: [] | ||
# List tags for your role here, one per line. A tag is a keyword that describes | ||
# and categorizes the role. Users find roles by searching for tags. Be sure to | ||
# remove the '[]' above, if you add tags to this list. | ||
# | ||
# NOTE: A tag is limited to a single word comprised of alphanumeric characters. | ||
# Maximum 20 tags per role. | ||
|
||
dependencies: [] | ||
# List your role dependencies here, one per line. Be sure to remove the '[]' above, | ||
# if you add dependencies to this list. |
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,10 @@ | ||
Limit to specific distribution | ||
|
||
``` | ||
env: | ||
matrix: | ||
- INSTANCE: platform-instance01 | ||
- INSTANCE: platform-instance02 | ||
script: | ||
- molecule converge -- --limit="localhost,${INSTANCE}" | ||
``` |
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,17 @@ | ||
******* | ||
Vagrant driver installation guide | ||
******* | ||
|
||
Requirements | ||
============ | ||
|
||
* Vagrant | ||
* Virtualbox, Parallels, VMware Fusion, VMware Workstation or VMware Desktop | ||
* python-vagrant | ||
|
||
Install | ||
======= | ||
|
||
.. code-block:: bash | ||
$ sudo pip install python-vagrant |
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,44 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
driver: | ||
name: vagrant | ||
provider: | ||
name: virtualbox | ||
# lint: | ||
# name: yamllint | ||
platforms: | ||
# - name: trusty | ||
# box: ubuntu/trusty64 | ||
# # interfaces: | ||
# # - network_name: public_network | ||
# # type: dhcp | ||
# # auto_config: true | ||
- name: xenial | ||
box: ubuntu/xenial64 | ||
#- name: bionic | ||
# box: ubuntu/bionic64 | ||
# interfaces: | ||
# - network_name: public_network | ||
# type: dhcp | ||
# auto_config: true | ||
# - name: centos6 | ||
# box: centos/6 | ||
#- name: centos7 | ||
# box: centos/7 | ||
# - name: fedora28 | ||
# box: generic/fedora28 | ||
# - name: alpine | ||
# box: generic/alpine28 | ||
|
||
|
||
provisioner: | ||
name: ansible | ||
# lint: | ||
# name: ansible-lint | ||
scenario: | ||
name: default | ||
verifier: | ||
name: testinfra | ||
lint: | ||
name: flake8 |
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,16 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
|
||
pre_tasks: | ||
- debug: msg="Pre tasks section for {{ansible_host}}" | ||
|
||
- set_fact: | ||
remote_ip_address: "{{ ansible_host }}" | ||
|
||
- include_vars: "playbook_vars.yml" | ||
|
||
roles: | ||
- { | ||
role: "sa-acme-sh" | ||
} |
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 @@ | ||
--- |
Oops, something went wrong.