Skip to content

Commit f8e4996

Browse files
Merge pull request #11 from noelmcloughlin/minor-fixes
Minor fixes for SQLPLUS init & developer states
2 parents 4019e24 + 7a3d583 commit f8e4996

File tree

6 files changed

+17
-10
lines changed

6 files changed

+17
-10
lines changed

README.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ On Linux, the PATH is set for all system users by adding software profile to /et
3434

3535
.. note::
3636

37-
The linux-alternatives 'priority' pillar value must be updated for each newly installed release/editions.
38-
37+
Enable Debian alternatives by setting nonzero 'altpriority' pillar value; otherwise feature is disabled.
3938

4039
Please see the pillar.example for configuration.
4140
Tested on Linux (Ubuntu, Fedora, Arch, and Suse), MacOS. Not verified on Windows OS.

pillar.example

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ sqlplus:
1414
#sdk: md5=6791925e182d534a8143847263157d8f'
1515
#sqlplus: md5=0c23f99617f6c2d11ac6df1704c7cd85
1616
linux:
17-
#Increase priority for every version installed
18-
altpriority: 190
17+
#Enable Debian alternatives feature by setting nonzero 'altpriority' value here.
18+
#Increase same value on each subsequent software installation.
19+
#altpriority: 170
1920
dl:
2021
retries: 1
2122
interval: 30

sqlplus/defaults.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ sqlplus:
2323
skip_hashcheck: False
2424

2525
linux:
26-
symlink: /usr/local/bin/sqlplus
27-
altpriority: 170
2826
ldconfig: no
27+
symlink: /usr/local/bin/sqlplus
28+
#debian alternatives is disabled by default. Activated via pillar value.
29+
altpriority: 0
2930

3031
prefs:
3132
tnsnamesurl: undefined

sqlplus/developer.sls

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
33
{% if sqlplus.prefs.tnsnamesurl not in (None, 'undefined') %}
44
5+
{% if grains.os not in ('Windows') %}
6+
57
sqlplus-tnsnames-ora:
68
cmd.run:
79
- name: curl {{ sqlplus.dl.opts }} -o /etc/tnsnames.ora '{{ sqlplus.prefs.tnsnamesurl }}'
@@ -13,5 +15,7 @@ sqlplus-tnsnames-ora:
1315
interval: {{ sqlplus.dl.interval }}
1416
{% endif %}
1517
18+
{% endif %}
19+
1620
{%- endif %}
1721

sqlplus/init.sls

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ sqlplus-create-extract-dirs:
44
file.directory:
55
- names:
66
- '{{ sqlplus.tmpdir }}'
7-
- '{{ sqlplus.oracle.realhome }}'
7+
- '{{ sqlplus.oracle.home }}'
88
{% if grains.os not in ('MacOS', 'Windows') %}
9+
- '{{ sqlplus.oracle.realhome }}'
910
- user: root
1011
- group: root
1112
- mode: 755

sqlplus/linuxenv.sls

+4-3
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ sqlplus-ldconfig:
5858
5959
{% endif %}
6060
61-
## Debian Alternatives ##
62-
63-
{% if grains.os_family not in ('Arch') %}
61+
## Debian Alternatives ##
62+
{% if sqlplus.linux.altpriority > 0 %}
63+
{% if grains.os_family not in ('Arch') %}
6464
6565
# Add swhome to alternatives system
6666
sqlplus-home-alt-install:
@@ -100,6 +100,7 @@ sqlplus-alt-set:
100100
- onchanges:
101101
- alternatives: sqlplus-alt-install
102102
103+
{% endif %}
103104
{% endif %}
104105
105106
{% endif %}

0 commit comments

Comments
 (0)