library/roles: Ansible 2 compatibility.
This commit is contained in:
parent
01cdd8e432
commit
670a98fa2a
|
@ -26,12 +26,12 @@
|
|||
|
||||
- name: Set the read/write permissions on the tomcat default options files
|
||||
acl: name=/etc/default/tomcat-instance-{{ item.http_port }} entity={{ item.user }} etype=user permissions=rw state=present
|
||||
with_items: tomcat_m_instances
|
||||
with_items: '{{ tomcat_m_instances }}'
|
||||
tags: [ 'tomcat', 'd4science', 'acl' ]
|
||||
|
||||
- name: Set the read/write permissions on the tomcat default local options files
|
||||
acl: name=/etc/default/tomcat-instance-{{ item.http_port }}.local entity={{ item.user }} etype=user permissions=rw state=present
|
||||
with_items: tomcat_m_instances
|
||||
with_items: '{{ tomcat_m_instances }}'
|
||||
tags: [ 'tomcat', 'd4science', 'acl' ]
|
||||
ignore_errors: True
|
||||
|
||||
|
|
|
@ -1,55 +1,48 @@
|
|||
---
|
||||
- name: setup the Oracle JDK repository on ubuntu
|
||||
apt_repository: repo='ppa:webupd8team/java' state=present
|
||||
apt_repository: repo='ppa:webupd8team/java' state=present update_cache=yes
|
||||
when: is_ubuntu
|
||||
register: update_apt_cache
|
||||
tags: jdk
|
||||
tags: [ 'oracle_jdk', 'jdk' ]
|
||||
|
||||
- name: setup the Oracle JDK repository on debian
|
||||
apt_repository: repo='deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main' state=present
|
||||
apt_repository: repo='deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main' state=present update_cache=yes
|
||||
when: is_debian
|
||||
register: update_apt_cache
|
||||
tags: jdk
|
||||
tags: [ 'oracle_jdk', 'jdk' ]
|
||||
|
||||
- name: Accept the Oracle Java license
|
||||
debconf: name='oracle-java{{ item }}-installer' question='shared/accepted-oracle-license-v1-1' value='true' vtype='select'
|
||||
with_items: jdk_version
|
||||
tags: jdk
|
||||
|
||||
- name: Update the apt cache
|
||||
apt: update_cache=yes
|
||||
when: update_apt_cache.changed or jdk_pkg_state == 'latest'
|
||||
tags: jdk
|
||||
with_items: '{{ jdk_version }}'
|
||||
tags: [ 'oracle_jdk', 'jdk' ]
|
||||
|
||||
- name: Install the latest version of Oracle JDK
|
||||
apt: pkg={{ item }} state={{ jdk_pkg_state }} force=yes
|
||||
when: not jdk_use_tarfile
|
||||
with_items: oracle_jdk_packages
|
||||
tags: jdk
|
||||
with_items: '{{ oracle_jdk_packages }}'
|
||||
tags: [ 'oracle_jdk', 'jdk' ]
|
||||
|
||||
- name: Install the extended security JCE Oracle JDK package
|
||||
apt: pkg=oracle-java{{ item }}-unlimited-jce-policy state={{ jdk_pkg_state }} force=yes
|
||||
with_items: jdk_version
|
||||
with_items: '{{ jdk_version }}'
|
||||
when:
|
||||
- not jdk_use_tarfile
|
||||
- jdk_install_strong_encryption_policy
|
||||
tags: jdk
|
||||
tags: [ 'oracle_jdk', 'jdk' ]
|
||||
|
||||
- name: Set the JDK default via update-alternatives
|
||||
apt: pkg=oracle-java{{ item }}-set-default state={{ jdk_pkg_state }} force=yes
|
||||
with_items: jdk_default
|
||||
with_items: '{{ jdk_default }}'
|
||||
when:
|
||||
- not jdk_use_tarfile
|
||||
- jdk_default is defined
|
||||
notify: Set the default Oracle JDK
|
||||
tags: jdk
|
||||
tags: [ 'oracle_jdk', 'jdk' ]
|
||||
|
||||
- name: Install a custom version of Oracle JDK from a tar file
|
||||
unarchive: src={{ jdk_tarfile }} dest={{ jdk_java_home_prefix }}
|
||||
when: jdk_use_tarfile
|
||||
tags: jdk
|
||||
when: '{{ jdk_use_tarfile }}'
|
||||
tags: [ 'oracle_jdk', 'jdk' ]
|
||||
|
||||
- name: Set fact jdk_installed
|
||||
set_fact: jdk_installed=True
|
||||
tags: jdk
|
||||
tags: [ 'oracle_jdk', 'jdk' ]
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{{ pgpool_pcp_user }}:{{ '{{ pcp_pwd }}' | hash('md5') }}
|
|
@ -28,7 +28,7 @@
|
|||
- name: Create the instances directory trees
|
||||
file: dest={{ item.0.instance_path }}/{{ item[1] }} owner={{ item.0.user }} group={{ item.0.user }} mode=0755 state=directory
|
||||
with_nested:
|
||||
- tomcat_m_instances
|
||||
- '{{ tomcat_m_instances }}'
|
||||
- [ 'common/classes', 'conf/Catalina/localhost', 'conf/policy.d', 'lib', 'server/classes', 'shared/classes', 'webapps' ]
|
||||
register: tomcat_first_install
|
||||
tags: [ 'tomcat', 'tomcat_instances' ]
|
||||
|
|
Loading…
Reference in New Issue