Skip to content

Commit

Permalink
fix(repo): provide EPEL repo configuration for amazon-2
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Oct 24, 2019
1 parent f313483 commit 25196c8
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions letsencrypt/install.sls
Original file line number Diff line number Diff line change
@@ -1,23 +1,41 @@
# -*- coding: utf-8 -*-
# vim: ft=sls
{% from "letsencrypt/map.jinja" import letsencrypt with context %}
{%- from "letsencrypt/map.jinja" import letsencrypt with context %}
{#- Use empty default for `grains.osfinger`, which isn't available in all distros #}
{%- if letsencrypt.use_package and
grains.osfinger|d('') == 'Amazon Linux-2' %}
{%- set rhel_ver = '7' %}
letsencrypt_external_repo:
pkgrepo.managed:
- name: epel
- humanname: Extra Packages for Enterprise Linux {{ rhel_ver }} - $basearch
- mirrorlist: https://mirrors.fedoraproject.org/metalink?repo=epel-{{ rhel_ver }}&arch=$basearch
- enabled: 1
- gpgcheck: 1
- gpgkey: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ rhel_ver }}
- failovermethod: priority
- require_in:
- pkg: letsencrypt-client
{%- endif %}
letsencrypt-client:
{% if letsencrypt.use_package %}
{%- if letsencrypt.use_package %}
pkg.installed:
- pkgs: {{ letsencrypt.pkgs | json }}
{% else %}
{%- else %}
pkg.installed:
- name: git
{% if letsencrypt.version is defined and letsencrypt.version|length %}
{%- if letsencrypt.version is defined and letsencrypt.version|length %}
# Note: `git.cloned` is unavailable in `2017.7`
git.cloned:
- name: https://github.com/certbot/certbot
- branch: {{ letsencrypt.version }}
- target: {{ letsencrypt.cli_install_dir }}
{% else %}
{%- else %}
git.latest:
- name: https://github.com/certbot/certbot
- target: {{ letsencrypt.cli_install_dir }}
- force_reset: True
{% endif %}
{% endif %}
{%- endif %}
{%- endif %}

0 comments on commit 25196c8

Please sign in to comment.