Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 'become' tags to operations that require root on Centos7 #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,29 +65,32 @@


- block:

# No link creation is necessary on Mac OS X --
# No link creation is necessary on Mac OS X --
# the package installer automatically creates symlinks in /usr/bin.

- name: link "{{ java_install_dir }}/{{ java_default_link_name }}"
become: yes
file:
dest: "{{ java_install_dir }}/{{ java_default_link_name }}"
src: "{{ java_install_dir }}/jdk{{ jdk_version }}"
state: link

- name: alternatives link for "java"
become: yes
alternatives:
name: java
link: /usr/bin/java
path: "{{ java_install_dir }}/{{ java_default_link_name }}/bin/java"

- name: alternatives link for "javac"
become: yes
alternatives:
name: javac
link: /usr/bin/javac
path: "{{ java_install_dir }}/{{ java_default_link_name }}/bin/javac"

- name: alternatives link for "jar"
become: yes
alternatives:
name: jar
link: /usr/bin/jar
Expand All @@ -98,6 +101,7 @@
register: filecheck

- name: alternatives link for "java_sdk"
become: yes
alternatives:
name: java_sdk
link: /usr/lib/jvm/java
Expand Down
1 change: 1 addition & 0 deletions tasks/use-rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@


- name: install JDK via RPM file with yum
become: True
yum:
name: "{{ java_download_path }}/{{ jdk_tarball_file }}.rpm"
state: present
Expand Down