Skip to content

Commit

Permalink
12.0.0+3.5.4 (#27)
Browse files Browse the repository at this point in the history
* tasks/main.yml: fix Jinja2 spacing

* introduced new variables: etcd_conf_dir_mode, etcd_download_dir_mode and etcd_bin_dir_mode

* update CHANGELOG

* meta/main.yml: min_ansible_version value should be string / platforms.versions values should be string

* names should start with uppercase

* defaults/main.yml: fix typo

* update Documentation value in templates/etc/systemd/system/etcd.service.j2

* add Github release action to push new release to Ansible Galaxy
  • Loading branch information
githubixx authored Sep 11, 2022
1 parent 3e61964 commit bda8d3b
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 7 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
# This workflow requires a GALAXY_API_KEY secret present in the GitHub
# repository or organization.
#
# See: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy
# See: https://github.com/ansible/galaxy/issues/46

name: Release
on:
push:
tags:
- '*'

defaults:
run:
working-directory: 'githubixx.etcd'

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v2
with:
path: 'githubixx.etcd'

- name: Set up Python 3.
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install Ansible.
run: pip3 install ansible-core

- name: Trigger a new import on Galaxy.
run: >-
ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }}
$(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
---------

**12.0.0+3.5.4**

- introduce new variables: `etcd_conf_dir_mode`, `etcd_download_dir_mode` and `etcd_bin_dir_mode` (see README)
- fix various `ansible-lint` issues
- add Github release action to push new release to Ansible Galaxy

**11.3.0+3.5.4**

- This is mainly a "cosmetic" change. Makes Ansible's linter `ansible-lint` happy, fixes a few typos and use FQDN module names
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,20 @@ etcd_peer_port: "2380"
etcd_interface: "tap0"
# Directory for etcd configuration
etcd_conf_dir: "/etc/etcd"
# Permissions for directory for etcd configuration
etcd_conf_dir_mode: 0755
# Directory to store downloaded etcd archive
# Should not be deleted to avoid downloading over and over again
etcd_download_dir: "/opt/etcd"
# Permissions for directory to store downloaded etcd archive
etcd_download_dir_mode: 0755
# Directory to store etcd binaries
etcd_bin_dir: "/usr/local/bin"
# Permissions for irectory to store etcd binaries
# IMPORTANT: If you use the default value for "etcd_bin_dir" which is
# "/usr/local/bin" make sure that the permissions are correct as this
# directory exists on every Linux filesystem and is very important!
etcd_bin_dir_mode: 0755
# etcd data directory (etcd database files so to say)
etcd_data_dir: "/var/lib/etcd"
# Architecture to download and install
Expand Down
9 changes: 9 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,20 @@ etcd_peer_port: "2380"
etcd_interface: "tap0"
# Directory for etcd configuration
etcd_conf_dir: "/etc/etcd"
# Permissions for directory for etcd configuration
etcd_conf_dir_mode: 0755
# Directory to store downloaded etcd archive
# Should not be deleted to avoid downloading over and over again
etcd_download_dir: "/opt/etcd"
# Permissions for directory to store downloaded etcd archive
etcd_download_dir_mode: 0755
# Directory to store etcd binaries
etcd_bin_dir: "/usr/local/bin"
# Permissions for directory to store etcd binaries
# IMPORTANT: If you use the default value for "etcd_bin_dir" which is
# "/usr/local/bin" make sure that the permissions are correct as this
# directory exists on every Linux filesystem and is very important!
etcd_bin_dir_mode: 0755
# etcd data directory (etcd database files so to say)
etcd_data_dir: "/var/lib/etcd"
# Architecture to download and install
Expand Down
2 changes: 1 addition & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
- name: reload systemd
- name: Reload systemd
ansible.builtin.systemd:
daemon_reload: true
7 changes: 4 additions & 3 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
---
galaxy_info:
author: Robert Wimmer
description: Installs etcd cluster.
license: GPLv3
min_ansible_version: 2.9
min_ansible_version: "2.9"
role_name: etcd
namespace: githubixx
platforms:
- name: Ubuntu
versions:
- bionic
- focal
- "bionic"
- "focal"
galaxy_tags:
- etcd
- ha
Expand Down
7 changes: 5 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,23 @@
ansible.builtin.file:
path: "{{ etcd_conf_dir }}"
state: directory
mode: "{{ etcd_conf_dir_mode }}"
tags:
- etcd

- name: Create etcd download directory
ansible.builtin.file:
path: "{{ etcd_download_dir }}"
state: directory
mode: "{{ etcd_download_dir_mode }}"
tags:
- etcd

- name: Create etcd bin directory
ansible.builtin.file:
path: "{{ etcd_bin_dir }}"
state: directory
mode: "{{ etcd_bin_dir_mode }}"
tags:
- etcd

Expand Down Expand Up @@ -81,7 +84,7 @@

- name: Combine etcd_settings and etcd_settings_user (if defined)
ansible.builtin.set_fact:
etcd_settings: "{{ etcd_settings | combine(etcd_settings_user|default({})) }}"
etcd_settings: "{{ etcd_settings | combine(etcd_settings_user | default({})) }}"
tags:
- etcd
- etcd-systemd
Expand All @@ -94,7 +97,7 @@
group: root
mode: 0644
notify:
- reload systemd
- Reload systemd
tags:
- etcd
- etcd-systemd
Expand Down
2 changes: 1 addition & 1 deletion templates/etc/systemd/system/etcd.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{%- endif %}
[Unit]
Description=etcd
Documentation=https://github.com/coreos
Documentation=https://github.com/etcd-io/etcd/

[Service]
{% if etcd_allow_unsupported_archs %}
Expand Down

0 comments on commit bda8d3b

Please sign in to comment.