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/tasks/compile_ranger.yml
L3D fd2a5afebb
Cleanup ranger install
+ adding block/rescue
+ improve lint
+ actions
+ docs
+ meta
2023-10-29 15:09:27 +01:00

52 lines
1.3 KiB
YAML

---
- name: Download ranger git repo
ansible.builtin.git:
repo: "{{ ranger.repo }}"
dest: "{{ ranger.download_directory }}"
version: "{{ ranger.branch }}"
- name: Install build packages
become: true
ansible.builtin.package:
name: "{{ ranger__build_deps }}"
state: 'present'
- name: Run 'install' target as root # noqa: H1901
become: true
community.general.make:
chdir: "{{ ranger.download_directory }}"
target: 'install'
when: ansible_python_version[:1] == '3'
- name: Install python3
become: true
ansible.builtin.package:
name: 'python3'
state: 'present'
register: install_python3
- name: Install ranger with python3
become: true
ansible.builtin.command: python3 setup.py install --optimize=1
args:
chdir: "{{ ranger.download_directory }}"
creates: '/usr/local/bin/ranger'
when: not install_python3.failed
- name: Install legacy-python f00
become: true
ansible.builtin.package:
name: "{{ item }}"
state: 'present'
loop:
- 'python'
- 'python-setuptools'
when: install_python3.failed
- name: Install ranger with legacy-python
become: true
ansible.builtin.command: python setup.py install --optimize=1
args:
chdir: "{{ ranger.download_directory }}"
creates: '/usr/local/bin/ranger'
when: install_python3.failed