Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

Commit

Permalink
support artix linux (maybe other openrc based distributions) (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
bodsch authored Sep 17, 2021
1 parent f25818e commit 9e312e6
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
19 changes: 17 additions & 2 deletions tasks/prepare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
files:
# eg. debian-10 / ubuntu-20.04 / centos-8 / oraclelinux-8
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version }}.yaml"
# eg. archlinux-systemd / archlinux-openrc
- "{{ ansible_distribution | lower }}-{{ ansible_service_mgr | lower }}.yaml"
# eg. debian / ubuntu / centos / oraclelinux
- "{{ ansible_distribution | lower }}.yaml"
# eg. redhat / debian / archlinux
- "{{ ansible_os_family | lower }}.yaml"
# artixlinux
- "{{ ansible_os_family | lower | replace(' ', '') }}.yaml"
- default.yaml
skip: true

Expand All @@ -27,6 +27,21 @@
name: "{{ knot_dependencies }}"
state: present

- name: create requirements.txt
template:
src: requirements.txt.j2
dest: /tmp/knot-requirements.txt
mode: 0660

- name: install python packages
pip:
# executable: pip3
requirements: /tmp/knot-requirements.txt
state: present
ignore_errors: true
register: pip_install
# no_log: true

- name: get latest system information
setup:

Expand Down
4 changes: 4 additions & 0 deletions templates/requirements.txt.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% for k in knot_python_packages %}
{{ k.name }}{% if k.version is defined %}>={{ k.version }}{% endif %}

{% endfor %}
10 changes: 10 additions & 0 deletions vars/archlinux-openrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---

knot_packages:
- knot-openrc

docker_python_packages:
- name: jinja2
version: 3.0.1

...
2 changes: 2 additions & 0 deletions vars/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ knot_packages:
- knot
- knot-dnsutils

knot_python_packages: []

...

0 comments on commit 9e312e6

Please sign in to comment.