From 2850f5ad75c550d516f7a6197b9b1a302f6871e7 Mon Sep 17 00:00:00 2001 From: L3D Date: Fri, 12 Mar 2021 23:59:59 +0100 Subject: [PATCH] update new naming scheme --- meta/main.yml | 4 ++-- tasks/compile_ranger.yml | 22 +++++++++++----------- tasks/main.yml | 14 ++++++++------ 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/meta/main.yml b/meta/main.yml index 3ace4e2..94da760 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,11 +1,11 @@ --- galaxy_info: - author: L3D + author: do1jlr description: Ansible role to install the ranger file manager on linux. ranger is a console file manager with VI key bindings. role_name: ranger license: MIT min_ansible_version: 2.8 - github_branch: master + github_branch: main platforms: - name: Archlinux versions: all diff --git a/tasks/compile_ranger.yml b/tasks/compile_ranger.yml index acf4ca9..3b71bf7 100644 --- a/tasks/compile_ranger.yml +++ b/tasks/compile_ranger.yml @@ -1,13 +1,13 @@ --- - name: download ranger git repo - git: + ansible.builtin.git: repo: "{{ ranger.repo }}" dest: "{{ ranger.download_directory }}" version: "{{ ranger.branch }}" - name: install build packages become: true - package: + ansible.builtin.package: name: - make - git @@ -15,23 +15,23 @@ state: present - name: Run 'install' target as root - become: yes - make: + become: true + community.general.make: chdir: "{{ ranger.download_directory }}" target: install when: ansible_python_version[:1] == '3' - name: install python3 become: true - package: + ansible.builtin.package: name: python3 state: present register: install_python3 - ignore_errors: yes + ignore_errors: true - name: install ranger with python3 - become: yes - command: python3 setup.py install --optimize=1 + become: true + ansible.builtin.command: python3 setup.py install --optimize=1 args: chdir: "{{ ranger.download_directory }}" creates: '/usr/local/bin/ranger' @@ -39,7 +39,7 @@ - name: install legacy-python f00 become: true - package: + ansible.builtin.package: name: - python - python-setuptools @@ -47,8 +47,8 @@ when: install_python3.failed - name: install ranger with legacy-python - become: yes - command: python setup.py install --optimize=1 + become: true + ansible.builtin.command: python setup.py install --optimize=1 args: chdir: "{{ ranger.download_directory }}" creates: '/usr/local/bin/ranger' diff --git a/tasks/main.yml b/tasks/main.yml index 0e0bc00..8498f8d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,18 +1,20 @@ --- - name: combine ranger configuration - set_fact: + ansible.builtin.set_fact: ranger: "{{ _ranger|combine(ranger, recursive=True) }}" -- include_tasks: versioncheck.yml +- name: run optional versionscheck + ansible.builtin.include_tasks: versioncheck.yml when: submodules_versioncheck|bool - name: install ranger - become: yes - package: + become: true + ansible.builtin.package: name: ranger state: present register: install_ranger - ignore_errors: yes + ignore_errors: true -- include_tasks: compile_ranger.yml +- name: compile ranger if install failed + ansible.builtin.include_tasks: compile_ranger.yml when: install_ranger.failed