mirror of
https://github.com/roles-ansible/ansible_role_ranger.git
synced 2024-08-16 14:19:48 +02:00
commit
d7566efc02
20 changed files with 291 additions and 32 deletions
16
.github/workflows/ansible-centos-centos6.yml
vendored
Normal file
16
.github/workflows/ansible-centos-centos6.yml
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
name: Ansible check centos:centos6
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: ansible check with ubuntu:centos6
|
||||
uses: roles-ansible/check-ansible-centos-centos6-action@master
|
||||
with:
|
||||
targets: "./"
|
16
.github/workflows/ansible-centos-centos7.yml
vendored
Normal file
16
.github/workflows/ansible-centos-centos7.yml
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
name: Ansible check centos:centos7
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: ansible check with ubuntu:centos7
|
||||
uses: roles-ansible/check-ansible-centos-centos7-action@master
|
||||
with:
|
||||
targets: "./"
|
16
.github/workflows/ansible-centos-centos8.yml
vendored
Normal file
16
.github/workflows/ansible-centos-centos8.yml
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
name: Ansible check centos:centos8
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: ansible check with ubuntu:centos8
|
||||
uses: roles-ansible/check-ansible-centos-centos8-action@master
|
||||
with:
|
||||
targets: "./"
|
16
.github/workflows/ansible-centos-latest.yml
vendored
Normal file
16
.github/workflows/ansible-centos-latest.yml
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
name: Ansible check centos:latest
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: ansible check with ubuntu:latest
|
||||
uses: roles-ansible/check-ansible-centos-latest-action@master
|
||||
with:
|
||||
targets: "./"
|
16
.github/workflows/ansible-debian-jessie.yml
vendored
Normal file
16
.github/workflows/ansible-debian-jessie.yml
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
name: Ansible check debian:jessie
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: ansible check with debian:jessie
|
||||
uses: roles-ansible/check-ansible-debian-jessie-action@master
|
||||
with:
|
||||
targets: "./"
|
16
.github/workflows/ansible-debian-sid.yml
vendored
Normal file
16
.github/workflows/ansible-debian-sid.yml
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
name: Ansible check debian:sid
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: ansible check with debian:sid
|
||||
uses: roles-ansible/check-ansible-debian-sid-action@master
|
||||
with:
|
||||
targets: "./"
|
16
.github/workflows/ansible-debian-stretch.yml
vendored
Normal file
16
.github/workflows/ansible-debian-stretch.yml
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
name: Ansible check debian:stretch
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: ansible check with debian:stretch
|
||||
uses: roles-ansible/check-ansible-debian-stretch-action@master
|
||||
with:
|
||||
targets: "./"
|
16
.github/workflows/ansible-ubuntu-bionic.yml
vendored
Normal file
16
.github/workflows/ansible-ubuntu-bionic.yml
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
name: Ansible check ubuntu:bionic
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: ansible check with ubuntu:bionic
|
||||
uses: roles-ansible/check-ansible-ubuntu-bionic-action@master
|
||||
with:
|
||||
targets: "./"
|
16
.github/workflows/ansible-ubuntu-disco.yml
vendored
Normal file
16
.github/workflows/ansible-ubuntu-disco.yml
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
name: Ansible check ubuntu:disco
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: ansible check with ubuntu:disco
|
||||
uses: roles-ansible/check-ansible-ubuntu-disco-action@master
|
||||
with:
|
||||
targets: "./"
|
16
.github/workflows/ansible-ubuntu-eoan.yml
vendored
Normal file
16
.github/workflows/ansible-ubuntu-eoan.yml
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
name: Ansible check ubuntu:eoan
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: ansible check with ubuntu:eoan
|
||||
uses: roles-ansible/check-ansible-ubuntu-eoan-action@master
|
||||
with:
|
||||
targets: "./"
|
16
.github/workflows/ansible-ubuntu-focal.yml
vendored
Normal file
16
.github/workflows/ansible-ubuntu-focal.yml
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
name: Ansible check ubuntu:focal
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: ansible check with ubuntu:focal
|
||||
uses: roles-ansible/check-ansible-ubuntu-focal-action@master
|
||||
with:
|
||||
targets: "./"
|
16
.github/workflows/ansible-ubuntu-latest.yml
vendored
Normal file
16
.github/workflows/ansible-ubuntu-latest.yml
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
name: Ansible check ubuntu:latest
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: ansible check with ubuntu:latest
|
||||
uses: roles-ansible/check-ansible-ubuntu-latest-action@master
|
||||
with:
|
||||
targets: "./"
|
16
.github/workflows/ansible-ubuntu-trusty.yml
vendored
Normal file
16
.github/workflows/ansible-ubuntu-trusty.yml
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
name: Ansible check ubuntu:trusty
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: ansible check with ubuntu:trusty
|
||||
uses: roles-ansible/check-ansible-ubuntu-trusty-action@master
|
||||
with:
|
||||
targets: "./"
|
16
.github/workflows/ansible-ubuntu-xenial.yml
vendored
Normal file
16
.github/workflows/ansible-ubuntu-xenial.yml
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
name: Ansible check ubuntu:xenial
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: ansible check with ubuntu:xenial
|
||||
uses: roles-ansible/check-ansible-ubuntu-xenial-action@master
|
||||
with:
|
||||
targets: "./"
|
|
@ -20,7 +20,10 @@ install:
|
|||
script:
|
||||
- ansible-galaxy install do1jlr.ranger
|
||||
- ansible-lint .
|
||||
- echo -e "\n\n\n\n\nWe use github actions for more detailed tests.\n\nMore details about that in our github repo at:\nhttps://github.com/chaos-bodensee/role-ranger/actions\n\n\n\n\n\n"
|
||||
- echo -e "\n\n\n\n\nWe use github actions for more detailed tests.\n\nMore details about that in our github repo at:\nhttps://github.com/roles-ansible/role-ranger/actions\n\n\n\n\n\n"
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: never
|
||||
on_failure: always
|
||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
||||
|
|
49
README.md
49
README.md
|
@ -1,11 +1,7 @@
|
|||
[![Ansible Galaxy](https://raw.githubusercontent.com/chaos-bodensee/role-ranger/master/.github/galaxy.svg?sanitize=true)](https://galaxy.ansible.com/do1jlr/ranger)
|
||||
[![Build Status](https://travis-ci.org/chaos-bodensee/role-ranger.svg?branch=master)](https://travis-ci.org/chaos-bodensee/role-ranger)
|
||||
[![Ansible Lint check](https://github.com/chaos-bodensee/role-ranger/workflows/Ansible%20Lint%20check/badge.svg)](https://github.com/chaos-bodensee/role-ranger/actions?query=workflow%3A%22Ansible+Lint+check%22)
|
||||
[![Ansible check debian:stable](https://github.com/chaos-bodensee/role-ranger/workflows/Ansible%20check%20debian:stable/badge.svg)](https://github.com/chaos-bodensee/role-ranger/actions?query=workflow%3A%22Ansible+check+debian%3Astable%22)
|
||||
[![Ansible check debian:stable](https://github.com/chaos-bodensee/role-ranger/workflows/Ansible%20check%20debian:buster/badge.svg)](https://github.com/chaos-bodensee/role-ranger/actions?query=workflow%3A%22Ansible+check+debian%3Abuster%22)
|
||||
[![MIT License](https://raw.githubusercontent.com/chaos-bodensee/role-ranger/master/.github/license.svg?sanitize=true)](https://github.com/chaos-bodensee/role-ranger/blob/master/LICENSE)
|
||||
[![Ansible Galaxy](https://raw.githubusercontent.com/roles-ansible/role_ranger/master/.github/galaxy.svg?sanitize=true)](https://galaxy.ansible.com/do1jlr/ranger) [![Build Status](https://travis-ci.org/roles-ansible/role_ranger.svg?branch=master)](https://travis-ci.org/roles-ansible/role_ranger) [![MIT License](https://raw.githubusercontent.com/roles-ansible/role_ranger/master/.github/license.svg?sanitize=true)](https://github.com/roles-ansible/role_ranger/blob/master/LICENSE)
|
||||
|
||||
role-ranger
|
||||
|
||||
role_ranger
|
||||
==============
|
||||
|
||||
Ansible role to install the ranger file manager on linux. ranger is a console file manager with VI key bindings. More info about ranger is available at [github.com/ranger/ranger](https://github.com/ranger/ranger.git).
|
||||
|
@ -15,11 +11,11 @@ Ansible role to install the ranger file manager on linux. ranger is a console fi
|
|||
-------------
|
||||
First we try to install ``ranger`` with the default package manager.
|
||||
If this fails, we download the ranger git and compile it by ourself *(with python 3)*.<br/>
|
||||
We also perform a versioncheck that will check if a newer version of this role has been executed on this host before. You can disable it by setting ``ansible_versionscheck`` to `` false``
|
||||
We also could perform a simple versioncheck that will check if a newer version of this role has been executed on this host before. You can enable it by setting ``submodules_versioncheck`` to ``true``
|
||||
|
||||
How to use this role
|
||||
-------------
|
||||
You can either use this role via ansible galaxy or use it directly from [this](https://github.com/chaos-bodensee/role-ansible_version.git) git repository.
|
||||
You can either use this role via ansible galaxy or use it directly from [this](https://github.com/roles-ansible/role_ranger.git) git repository.
|
||||
|
||||
### ansible galaxy
|
||||
|
||||
|
@ -40,7 +36,7 @@ Example Ansible-Playbook:
|
|||
|
||||
Ansible-Rolle clonen:
|
||||
```bash
|
||||
git clone https://github.com/chaos-bodensee/role-ranger.git
|
||||
git clone https://github.com/roles-ansible/role_ranger.git
|
||||
```
|
||||
|
||||
Example Playbook:
|
||||
|
@ -48,19 +44,30 @@ Example Playbook:
|
|||
---
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role-ranger
|
||||
- role_ranger
|
||||
tags:
|
||||
- ranger
|
||||
vars:
|
||||
submodules_versioncheck: true
|
||||
```
|
||||
|
||||
### Testing
|
||||
This role is tested with [these github-action](https://github.com/search?q=topic%3Acentos+topic%3Acheck-ansible+topic%3Agithub-actions+org%3Aroles-ansible&type=Repositories) tests for different versions of centos. Linting is tested via travis-ci.
|
||||
If you want to find out more about our tests, please have a look at the github marketplace.
|
||||
|
||||
```
|
||||
[WORK-IN-PROGRESS]
|
||||
|
||||
done:
|
||||
- support for archlinux, centos + debian
|
||||
- ansible galaxy support
|
||||
|
||||
started:
|
||||
- travis && docker / actions checks
|
||||
```
|
||||
| test status | Github Marketplace |
|
||||
| :--------- | :---------------- |
|
||||
| [![Travis Build Status](https://travis-ci.org/roles-ansible/role_ranger.svg?branch=master)](https://travis-ci.org/roles-ansible/role_ranger) | [.travis.yml](https://github.com/roles-ansible/role_ranger/blob/master/.travis.yml) |
|
||||
| [![Ansible Lint check](https://github.com/roles-ansible/role_ranger/workflows/Ansible%20Lint%20check/badge.svg)](https://github.com/roles-ansible/role_ranger/actions?query=workflow%3A%22Ansible+Lint+check%22) | [ansible-lint action](https://github.com/marketplace/actions/ansible-lint)
|
||||
| [![Ansible check debian:stable](https://github.com/roles-ansible/role_ranger/workflows/Ansible%20check%20debian:stable/badge.svg)](https://github.com/roles-ansible/role_ranger/actions?query=workflow%3A%22Ansible+check+debian%3Astable%22) | [ansible test with debian stable](https://github.com/marketplace/actions/check-ansible-debian-stable) |
|
||||
| [![Ansible check debian:sid](https://github.com/roles-ansible/role_ranger/workflows/Ansible%20check%20debian:sid/badge.svg)](https://github.com/roles-ansible/role_ranger/actions?query=workflow%3A%22Ansible+check+debian%3Asid%22) | [ansible test with debian sid](https://github.com/marketplace/actions/check-ansible-debian-sid) |
|
||||
| [![Ansible check debian:buster](https://github.com/roles-ansible/role_ranger/workflows/Ansible%20check%20debian:buster/badge.svg)](https://github.com/roles-ansible/role_ranger/actions?query=workflow%3A%22Ansible+check+debian%3Abuster%22) | [ansible test with debian buster](https://github.com/marketplace/actions/check-ansible-debian-buster) |
|
||||
| [![Ansible check debian:jessie](https://github.com/roles-ansible/role_ranger/workflows/Ansible%20check%20debian:jessie/badge.svg)](https://github.com/roles-ansible/role_ranger/actions?query=workflow%3A%22Ansible+check+debian%3Ajessie%22) | [ansible test with debian jessie](https://github.com/marketplace/actions/check-ansible-debian-jessie) |
|
||||
| [![Ansible check debian:stretch](https://github.com/roles-ansible/role_ranger/workflows/Ansible%20check%20debian:stretch/badge.svg)](https://github.com/roles-ansible/role_ranger/actions?query=workflow%3A%22Ansible+check+debian%3Astretch%22) | [ansible test with debian stretch](https://github.com/marketplace/actions/check-ansible-debian-stretch) |
|
||||
| [![Ansible check ubuntu:latest](https://github.com/roles-ansible/role_ranger/workflows/Ansible%20check%20ubuntu:latest/badge.svg)](https://github.com/roles-ansible/role_ranger/actions?query=workflow%3A%22Ansible+check+ubuntu%3Alatest%22) | [ansible test with ubuntu latest](https://github.com/marketplace/actions/check-ansible-ubuntu-latest) |
|
||||
| [![Ansible check ubuntu:bionic](https://github.com/roles-ansible/role_ranger/workflows/Ansible%20check%20ubuntu:bionic/badge.svg)](https://github.com/roles-ansible/role_ranger/actions?query=workflow%3A%22Ansible+check+ubuntu%3Abionic%22) | [ansible test with ubuntu bionic](https://github.com/marketplace/actions/check-ansible-ubuntu-bionic) |
|
||||
| [![Ansible check ubuntu:disco](https://github.com/roles-ansible/role_ranger/workflows/Ansible%20check%20ubuntu:disco/badge.svg)](https://github.com/roles-ansible/role_ranger/actions?query=workflow%3A%22Ansible+check+ubuntu%3Adisco%22) | [ansible test with ubuntu disco](https://github.com/marketplace/actions/check-ansible-ubuntu-disco) |
|
||||
| [![Ansible check ubuntu:eoan](https://github.com/roles-ansible/role_ranger/workflows/Ansible%20check%20ubuntu:eoan/badge.svg)](https://github.com/roles-ansible/role_ranger/actions?query=workflow%3A%22Ansible+check+ubuntu%3Aeoan%22) | [ansible test with ubuntu eoan](https://github.com/marketplace/actions/check-ansible-ubuntu-eoan) |
|
||||
| [![Ansible check ubuntu:focal](https://github.com/roles-ansible/role_ranger/workflows/Ansible%20check%20ubuntu:focal/badge.svg)](https://github.com/roles-ansible/role_ranger/actions?query=workflow%3A%22Ansible+check+ubuntu%3Afocal%22) | [ansible test with ubuntu focal](https://github.com/marketplace/actions/check-ansible-ubuntu-focal) |
|
||||
| [![Ansible check ubuntu:trusty](https://github.com/roles-ansible/role_ranger/workflows/Ansible%20check%20ubuntu:trusty/badge.svg)](https://github.com/roles-ansible/role_ranger/actions?query=workflow%3A%22Ansible+check+ubuntu%3Atrusty%22) | [ansible test with ubuntu trusty](https://github.com/marketplace/actions/check-ansible-ubuntu-trusty) |
|
||||
| [![Ansible check ubuntu:xenial](https://github.com/roles-ansible/role_ranger/workflows/Ansible%20check%20ubuntu:xenial/badge.svg)](https://github.com/roles-ansible/role_ranger/actions?query=workflow%3A%22Ansible+check+ubuntu%3Axenial%22) | [ansible test with ubuntu xenial](https://github.com/marketplace/actions/check-ansible-ubuntu-xenial) |
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
---
|
||||
submodules_versioncheck: true
|
||||
# should we do a version check? (recomended)
|
||||
submodules_versioncheck: false
|
||||
|
||||
ranger_repo: 'https://github.com/ranger/ranger.git'
|
||||
ranger_branch: 'master'
|
||||
ranger_download_directory: "{{ x_ansible_download_dir | default('~/.ansible/tmp/downloads/ranger') }}"
|
||||
# variables for ranger
|
||||
ranger:
|
||||
repo: 'https://github.com/ranger/ranger.git'
|
||||
branch: 'master'
|
||||
download_directory: "{{ x_ansible_download_dir | default('~/.ansible/tmp/downloads/ranger') }}"
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
- name: download ranger git repo
|
||||
git:
|
||||
repo: "{{ ranger_repo }}"
|
||||
dest: "{{ ranger_download_directory }}"
|
||||
version: "{{ ranger_branch }}"
|
||||
repo: "{{ ranger.repo }}"
|
||||
dest: "{{ ranger.download_directory }}"
|
||||
version: "{{ ranger.branch }}"
|
||||
|
||||
- name: install build packages
|
||||
become: true
|
||||
|
@ -17,7 +17,7 @@
|
|||
- name: Run 'install' target as root
|
||||
become: yes
|
||||
make:
|
||||
chdir: "{{ ranger_download_directory }}"
|
||||
chdir: "{{ ranger.download_directory }}"
|
||||
target: install
|
||||
when: ansible_python_version[:1] == '3'
|
||||
|
||||
|
@ -26,10 +26,21 @@
|
|||
package:
|
||||
name: python3
|
||||
state: present
|
||||
register: install_python3
|
||||
ignore_errors: yes
|
||||
|
||||
- name: install ranger with python3
|
||||
become: yes
|
||||
command: python3 setup.py install --optimize=1
|
||||
args:
|
||||
chdir: "{{ ranger_download_directory }}"
|
||||
chdir: "{{ ranger.download_directory }}"
|
||||
creates: '/usr/local/bin/ranger'
|
||||
when: not install_python3.failed
|
||||
|
||||
- name: install ranger with legacy-python
|
||||
become: yes
|
||||
command: python setup.py install --optimize=1
|
||||
args:
|
||||
chdir: "{{ ranger.download_directory }}"
|
||||
creates: '/usr/local/bin/ranger'
|
||||
when: install_python3.failed
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
---
|
||||
- name: combine ranger configuration
|
||||
set_fact:
|
||||
ranger: "{{ _ranger|combine(ranger, recursive=True) }}"
|
||||
|
||||
- include_tasks: versioncheck.yml
|
||||
when: submodules_versioncheck|bool
|
||||
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
---
|
||||
# versionscheck
|
||||
playbook_version_number: 1025 # should be over ninethousand
|
||||
playbook_version_path: 'role-ranger_chaos-bodensee_github.com.version'
|
||||
playbook_version_path: 'role-ranger_roles-ansible_github.com.version'
|
||||
|
||||
# variables for ranger
|
||||
_ranger:
|
||||
repo: 'https://github.com/ranger/ranger.git'
|
||||
branch: 'master'
|
||||
download_directory: "{{ x_ansible_download_dir | default('~/.ansible/tmp/downloads/ranger') }}"
|
||||
|
|
Loading…
Reference in a new issue