generated from sebclem/ansible-role-template
🆗 First release
This commit is contained in:
parent
86fa7904b1
commit
56bb135866
3
ansible.cfg
Normal file
3
ansible.cfg
Normal file
@ -0,0 +1,3 @@
|
||||
[defaults]
|
||||
roles_path = ../
|
||||
stdout_callback = yaml
|
@ -1,2 +1,5 @@
|
||||
---
|
||||
# defaults file for ${REPO_NAME_TITLE}
|
||||
|
||||
lsd_version: 0.23.1
|
||||
lsd_arch: amd64
|
||||
|
1
tasks/install.yml
Normal file
1
tasks/install.yml
Normal file
@ -0,0 +1 @@
|
||||
---
|
@ -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
|
||||
|
@ -1,2 +1 @@
|
||||
localhost
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
- hosts: locahost
|
||||
remote_user: root
|
||||
roles:
|
||||
- Ansible-Lsd-Role
|
||||
- ansible-lsd-role
|
||||
|
@ -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 }}"
|
||||
|
Loading…
Reference in New Issue
Block a user