🆗 First release

This commit is contained in:
SebClem 2022-11-09 17:08:55 +01:00
parent 86fa7904b1
commit 56bb135866
Signed by: sebclem
GPG Key ID: 5A4308F6A359EA50
7 changed files with 31 additions and 3 deletions

3
ansible.cfg Normal file
View File

@ -0,0 +1,3 @@
[defaults]
roles_path = ../
stdout_callback = yaml

View File

@ -1,2 +1,5 @@
---
# defaults file for ${REPO_NAME_TITLE}
lsd_version: 0.23.1
lsd_arch: amd64

1
tasks/install.yml Normal file
View File

@ -0,0 +1 @@
---

View File

@ -1,2 +1,19 @@
---
# tasks file for Ansible-Lsd-Role
- name: Get current lsd version
shell:
cmd: lsd --version 2>&1 | cut -d ' ' -f 2
register: result
changed_when: false
failed_when: result.rc != 0
- name: Set need install
set_fact:
need_install: "{{ result.stdout != lsd_version }}"
changed_when: need_install
- name: Install Lsd
ansible.builtin.apt:
deb: "{{ github_bin_url }}"
when: need_install

View File

@ -1,2 +1 @@
localhost

View File

@ -1,5 +1,5 @@
---
- hosts: localhost
- hosts: locahost
remote_user: root
roles:
- Ansible-Lsd-Role
- ansible-lsd-role

View File

@ -1,2 +1,7 @@
---
# vars file for Ansible-Lsd-Role
lsd_github_org: Peltoche
lsd_github_repo: lsd
lsd_bin_name: "lsd_{{ lsd_version }}_{{ lsd_arch }}.deb"
github_bin_url: "https://github.com/{{ lsd_github_org }}/{{ lsd_github_repo }}/releases/download/{{ lsd_version }}/{{ lsd_bin_name }}"