1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_ranger.git synced 2024-08-16 14:19:48 +02:00
ansible_role_ranger/README.md

73 lines
2.4 KiB
Markdown
Raw Permalink Normal View History

2021-03-13 00:09:37 +01:00
[![Ansible Galaxy](https://raw.githubusercontent.com/roles-ansible/ansible_role_ranger/master/.github/galaxy.svg?sanitize=true)](https://galaxy.ansible.com/do1jlr/ranger) [![MIT License](https://raw.githubusercontent.com/roles-ansible/ansible_role_ranger/master/.github/license.svg?sanitize=true)](https://github.com/roles-ansible/ansible_role_ranger/blob/master/LICENSE)
2020-02-13 21:15:49 +01:00
2020-10-27 16:54:54 +01:00
ansible_role_ranger
2020-01-29 12:51:25 +01:00
==============
2020-02-13 14:23:18 +01:00
2020-01-29 12:51:25 +01:00
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).
2020-02-13 14:21:52 +01:00
What does this role do?
-------------
2020-04-13 20:28:31 +02:00
+ This role try to install ``ranger`` with the default package manager.
+ If this fails, this role will download the ranger git and compile it by ourself *(with python 3)*.
+ 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``
2020-02-13 14:21:52 +01:00
How to use this role
-------------
2020-10-27 16:54:54 +01:00
You can either use this role via ansible galaxy or use it directly from [this](https://github.com/roles-ansible/ansible_role_ranger.git) git repository.
2020-02-13 14:21:52 +01:00
### ansible galaxy
2020-04-13 20:28:31 +02:00
install role:
2020-02-13 20:09:18 +01:00
```bash
2020-02-13 14:21:52 +01:00
ansible-galaxy install do1jlr.ranger
```
2020-05-16 21:12:29 +02:00
You can execute the role **directly via ansible ad-hoc command**, but it is highly recomended to create a ansible playbook
```bash
# example ad-hoc command
ansible -m include_role -a "name=do1jlr.ranger" localhost
```
2020-02-13 20:09:18 +01:00
Example Ansible-Playbook:
```yml
---
- hosts: localhost
roles:
- {role: do1jlr.ranger, tags: ranger}
2020-02-13 20:09:18 +01:00
```
2020-05-16 21:12:29 +02:00
### use via git command
2020-04-13 20:28:31 +02:00
clone github repo:
2020-02-13 20:09:18 +01:00
```bash
2020-10-27 16:54:54 +01:00
git clone https://github.com/roles-ansible/ansible_role_ranger.git
2020-02-13 20:09:18 +01:00
```
2020-04-13 20:28:31 +02:00
example Playbook:
2020-02-13 20:09:18 +01:00
```yaml
---
- hosts: localhost
roles:
- {role: ansible_role_ranger, tags: ranger}
2020-02-13 20:09:18 +01:00
```
## Requirements
The ``community.general`` collection is required for some parts of this ansible role.
You can install it with this command:
```bash
ansible-galaxy collection install -r requirements.yml --upgrade
```
2020-03-04 23:27:40 +01:00
variables
-------
```yaml
# perform simple versionscheck (true is recomended)
submodules_versioncheck: false
2020-04-13 22:38:23 +02:00
# parameter for ranger installation
2020-03-04 23:27:40 +01:00
ranger:
repo: 'https://github.com/ranger/ranger.git'
branch: 'master'
download_directory: "{{ x_ansible_download_dir | default(ansible_env.HOME + '/.ansible/tmp/downloads/ranger') }}"
2020-03-04 23:27:40 +01:00
```