Procházet zdrojové kódy

add additional shared libraries (#137)

* This merge request gives the ability to add shared libaries without set LD_LIBRARY_PATH variable.

 1. Generate file in /etc/ld.so.conf.d/
 2. update /etc/ld.so.cache with ldconfig command

example pillars:

linux:
  system:
    enabled: True
    ld:
      libraries:
        java:
          - /usr/lib/jvm/jre-openjdk/lib/amd64/server
          - /opt/java/jre/lib/amd64/server

* fix format in README.rst for Shared Libraries

* Fix for #137 - change pillar libraries key to library
pull/139/head
Nick Metz před 7 roky
rodič
revize
f04f5f3630
3 změnil soubory, kde provedl 43 přidání a 0 odebrání
  1. +17
    -0
      README.rst
  2. +3
    -0
      linux/system/init.sls
  3. +23
    -0
      linux/system/ld.sls

+ 17
- 0
README.rst Zobrazit soubor

@@ -420,6 +420,23 @@ Enable cpufreq governor for every cpu:
cpu:
governor: performance


Shared Libraries
~~~~~~~~~~~~~~~~

Set additional shared library to Linux system library path

.. code-block:: yaml

linux:
system:
ld:
library:
java:
- /usr/lib/jvm/jre-openjdk/lib/amd64/server
- /opt/java/jre/lib/amd64/server

Certificates
~~~~~~~~~~~~


+ 3
- 0
linux/system/init.sls Zobrazit soubor

@@ -99,6 +99,9 @@ include:
{%- if system.directory is defined %}
- linux.system.directory
{%- endif %}
{%- if system.ld is defined %}
- linux.system.ld
{%- endif %}
{%- if system.apt is defined and grains.os_family == 'Debian' %}
- linux.system.apt
{%- endif %}

+ 23
- 0
linux/system/ld.sls Zobrazit soubor

@@ -0,0 +1,23 @@
{%- from "linux/map.jinja" import system with context %}

{%- if system.enabled %}

{%- for key in system.ld.library %}
/etc/ld.so.conf.d/{{ key }}.conf:
file.managed:
- user: root
- group: root
- mode: 644
- contents: |
{% for val in system.ld.library[key] -%}
{{ val }}
{% endfor %}
- watch_in:
- cmd: ldconfig_update
{% endfor %}

ldconfig_update:
cmd.wait:
- name: ldconfig

{% endif %}

Načítá se…
Zrušit
Uložit