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

initialize git repository

This commit is contained in:
L3D 2020-01-29 12:51:25 +01:00 committed by Lilian Roller
parent 2779b80cfa
commit 323745be4c
No known key found for this signature in database
GPG key ID: 5215C3441797AB2B
7 changed files with 67 additions and 3 deletions

5
.github/FUNDING.yml vendored Normal file
View file

@ -0,0 +1,5 @@
# Feel free to add yourself after && during participating at this repo!
github: [do1jlr]
liberapay: L3D
custom: ['https://paypal.me/c3woc']

View file

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2020 Chaos Bodensee Copyright (c) 2020 L3D <l3d@c3woc.de>
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View file

@ -1,2 +1,8 @@
# role-ranger role-ranger
Ansible role to install the ranger file manager on linux ==============
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).
```
[WORK-IN-PROGRESS]
```

2
defaults/main.yml Normal file
View file

@ -0,0 +1,2 @@
---
submodules_versioncheck: true

4
tasks/main.yml Normal file
View file

@ -0,0 +1,4 @@
---
- include_tasks: versioncheck.yml
when: submodules_versioncheck|bool

44
tasks/versioncheck.yml Normal file
View file

@ -0,0 +1,44 @@
---
- name: Create directory for versionscheck
become: true
file:
path: '/etc/.ansible-version'
state: directory
mode: 0755
when: submodules_versioncheck|bool
- name: check playbook version
become: true
slurp:
src: "/etc/.ansible-version/{{ playbook_version_path }}"
register: playbook_version
when: submodules_versioncheck|bool
ignore_errors: yes
- name: Print remote role version
debug:
msg: "Remote role version: {{ playbook_version.content | default('Y3VycmVudGx5IG5vdCBkZXBsb3llZAo=') | b64decode | string }}"
when: submodules_versioncheck|bool
- name: Print locale role version
debug:
msg: "Local role version: '{{ playbook_version_number|string }}'."
when: submodules_versioncheck|bool
- name: Check if your version is outdated
fail:
msg: "Your ansible module has the version '{{ playbook_version_number }}' and is outdated. You need to update it!"
when:
- playbook_version.content|default("Mgo=")|b64decode|int - 1 >= playbook_version_number|int and submodules_versioncheck|bool
- name: check if '/etc/ansible-version/' is empty
find:
paths: '/etc/ansible-version/'
register: filesFound
- name: write new version to remote disk
become: true
copy:
content: "{{ playbook_version_number }}"
dest: "/etc/.ansible-version/{{ playbook_version_path }}"
when: submodules_versioncheck|bool

3
vars/main.yml Normal file
View file

@ -0,0 +1,3 @@
---
playbook_version_number: 1024 # should be over ninethousand
playbook_version_path: 'role-ranger_chaos-bodensee_github.com.version'