Skip to content
Snippets Groups Projects
Commit ae85b4b3 authored by nimrod's avatar nimrod
Browse files

- Support only OSes that have certbot packaged.

- Early stage of role, WIP.
parent 342f2105
No related branches found
No related tags found
No related merge requests found
[submodule "library/shore"]
path = library/shore
url = https://www.shore.co.il/git/ansible-modules
......@@ -11,11 +11,8 @@ env:
- platform: openbsd60
- &openbsd59 platform=openbsd59
- platform: xenial
- platform: trusty
- platform: precise
- &stretch platform=stretch
- platform: jessie
- platform: wheezy
matrix:
fast_finish: True
allow_failures:
......
---
# defaults file for certbot
certbot_config:
domains: example.com
shore @ 2efdc7b0
Subproject commit 2efdc7b0a7d963ca5f2d7887530776906b319486
......@@ -12,14 +12,16 @@ galaxy_info:
- name: Ubuntu
versions:
- xenial
- trusty
- precise
- name: Debian
versions:
- stretch
- jessie
- wheezy
galaxy_tags: [ ansible ]
dependencies:
- name: python27
src: adarnimrod.python27
- name: backports
src: adarnimrod.backports
when: ansible_os_family == 'Debian' and ansible_distribution_release == 'jessie'
- name: ca-store
src: adarnimrod.ca-store
......@@ -5,4 +5,28 @@
assert:
that:
- ansible_os_family in ['OpenBSD', 'Debian']
- ansible_distribution_release in ['6.0', '5.9', 'xenial', 'trusty', 'precise', 'stretch', 'jessie', 'wheezy']
- ansible_distribution_release in ['6.0', '5.9', 'xenial', 'trusty', 'precise', 'stretch', 'jessie']
- certbot_config is iterable
- certbot_config['domains'] is defined
- name: APT install
when: ansible_pkg_mgr == 'apt'
apt:
name: letsencrypt
state: present
update_cache: yes
cache_valid_time: 3600
- name: pkg add
when: ansible_pkg_mgr == 'openbsd_pkg'
openbsd_pkg:
name: letsencrypt
state: present
- name: Copy config
template:
src: cli.ini
dest: /etc/letsencrypt/cli.ini
owner: root
group: 0
mode: 0o0644
{% for key, value in certbot_config.iteritems() -%}
{{ key }} = {{ value }}
{%- endfor %}
def test_certbot_cli(Command):
assert Command('letsencrypt --version').rc == 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment