Skip to content

Commit

Permalink
Rename role
Browse files Browse the repository at this point in the history
  • Loading branch information
boutetnico committed Nov 11, 2020
1 parent 24b752b commit d82640a
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 29 deletions.
2 changes: 0 additions & 2 deletions .ansible-lint

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Release to Galaxy

on:
push:
tags:
- '*'

jobs:
release:

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v2

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -q ansible
- name: Import role into Ansible Galaxy
run: ansible-galaxy role import --api-key ${GALAXY_API_KEY} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
env:
GALAXY_API_KEY: ${{ secrets.GALAXY_API_KEY }}
14 changes: 10 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
---
name: Test ansible role

on: [push]
on:
pull_request:
push:
branches:
- master
schedule:
- cron: "22 2 * * 2"

jobs:
test:
Expand All @@ -10,21 +16,21 @@ jobs:

strategy:
matrix:
ansible: [2.6, 2.7, 2.8, 2.9]
ansible: ["2.7", "2.8", "2.9", "2.10"]

steps:

- uses: actions/checkout@v2

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -q ansible~=${{ matrix.ansible }} ansible-lint docker flake8 molecule testinfra
pip install -q ansible~=${{ matrix.ansible }} ansible-lint docker flake8 molecule molecule-docker testinfra
- name: Display versions
run: |
Expand Down
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
ansible-role-oh-my-zsh
======================
[![tests](https://github.com/boutetnico/ansible-role-ohmyzsh/workflows/Test%20ansible%20role/badge.svg)](https://github.com/boutetnico/ansible-role-ohmyzsh/actions?query=workflow%3A%22Test+ansible+role%22)
[![Ansible Galaxy](https://img.shields.io/badge/galaxy-boutetnico.ohmyzsh-blue.svg)](https://galaxy.ansible.com/boutetnico/ohmyzsh)

This role configures oh-my-zsh.
ansible-role-ohmyzsh
====================

This role installs and configures [Oh My Zsh](https://github.com/ohmyzsh/ohmyzsh).

Requirements
------------

Ansible 2.6 or newer.
Ansible 2.7 or newer.

Supported Platforms
-------------------
Expand All @@ -19,14 +22,14 @@ Supported Platforms
Role Variables
--------------

| Variable | Required | Default | Choices | Comments |
|------------------------------|----------|--------------- |-----------|---------------------------------------------|
| oh_my_zsh_theme | yes | `robbyrussell` | string | Default theme |
| oh_my_zsh_custom_themes | no | | string | Local path to themes files to install |
| oh_my_zsh_plugins | yes | `[git]` | list | Default plugins |
| oh_my_zsh_users | yes | `[]` | list | Users to configure. See `defaults/main.yml` |
| oh_my_zsh_alias | yes | `[]` | list | Default alias |
| oh_my_zsh_extra_lines | yes | `[]` | list | Extra config lines in `.zshrc` |
| Variable | Required | Default | Choices | Comments |
|------------------------------|----------|--------------- |-----------|----------------------------------------------|
| oh_my_zsh_theme | yes | `robbyrussell` | string | Default theme. |
| oh_my_zsh_custom_themes | no | | string | Local path to themes files to install. |
| oh_my_zsh_plugins | yes | `[git]` | list | Default plugins. |
| oh_my_zsh_users | yes | `[]` | list | Users to configure. See `defaults/main.yml`. |
| oh_my_zsh_alias | yes | `[]` | list | Default alias. |
| oh_my_zsh_extra_lines | yes | `[]` | list | Extra config lines in `.zshrc`. |

Dependencies
------------
Expand All @@ -38,7 +41,7 @@ Example Playbook

- hosts: all
roles:
- ansible-role-oh-my-zsh
- ansible-role-ohmyzsh
oh_my_zsh_theme: bira
oh_my_zsh_custom_themes: files/oh-my-zsh/themes/*.zsh-theme
oh_my_zsh_plugins:
Expand Down
8 changes: 5 additions & 3 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
---
galaxy_info:
role_name: ohmyzsh
author: Nicolas Boutet
description: Install and configure oh-my-zsh
description: Install and configure oh-my-zsh.
license: MIT
min_ansible_version: 2.6
min_ansible_version: 2.7
platforms:
- name: Ubuntu
versions:
- bionic
- focal
- name: Debian
versions:
- stretch
- buster
- stretch
galaxy_tags:
- ohmyzsh
- shell
- zsh
dependencies: []
2 changes: 1 addition & 1 deletion molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
hosts: all

roles:
- role: ansible-role-oh-my-zsh
- role: ansible-role-ohmyzsh
oh_my_zsh_theme: test_theme1
oh_my_zsh_custom_themes: tests/themes/*.zsh-theme
oh_my_zsh_plugins:
Expand Down
8 changes: 4 additions & 4 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ driver:
name: docker

platforms:
- name: ansible-role-oh-my-zsh-debian-9
- name: ansible-role-ohmyzsh-debian-9
image: debian:9
- name: ansible-role-oh-my-zsh-debian-10
- name: ansible-role-ohmyzsh-debian-10
image: debian:10
- name: ansible-role-oh-my-zsh-ubuntu-1804
- name: ansible-role-ohmyzsh-ubuntu-1804
image: ubuntu:18.04
- name: ansible-role-oh-my-zsh-ubuntu-2004
- name: ansible-role-ohmyzsh-ubuntu-2004
image: ubuntu:20.04

lint: |
Expand Down
2 changes: 0 additions & 2 deletions vars/main.yml

This file was deleted.

0 comments on commit d82640a

Please sign in to comment.