Skip to content

Commit

Permalink
Merge pull request #97 from icatproject-contrib/payara_user_group
Browse files Browse the repository at this point in the history
Add payara_user_group variable
  • Loading branch information
ajkyffin committed Oct 23, 2023
2 parents b2cdb29 + 5f8485a commit afd5b67
Show file tree
Hide file tree
Showing 21 changed files with 126 additions and 125 deletions.
1 change: 1 addition & 0 deletions group_vars/all/vars.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
# Payara user and admin user's password
payara_user: "glassfish"
payara_user_group: "{{ payara_user }}"
payara_admin_password: "{{ vault_payara_admin_password }}"

# Database root user's username and password
Expand Down
12 changes: 6 additions & 6 deletions roles/authn_anon/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
extension: "zip"
dest: "/home/{{ payara_user }}/downloads/authn.anon-{{ authn_anon_version }}-distro.zip"
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
when: packageResult.stat.exists is defined and packageResult.stat.exists == false

Expand All @@ -24,7 +24,7 @@
dest: /home/{{ payara_user }}/install
remote_src: true
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
when: ansible_local.local.instantiations.authn_anon is not defined or ansible_local.local.versions.authn_anon != authn_anon_version

- name: "Find any war files not matching the current version"
Expand All @@ -45,7 +45,7 @@
src: "{{ role_path }}/../payara/templates/setup.properties.j2"
dest: /home/{{ payara_user }}/install/authn.anon/setup.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0600
notify:
- "authn_anon-handler"
Expand All @@ -60,7 +60,7 @@
src: file/run.properties
dest: /home/{{ payara_user }}/install/authn.anon/run.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
when: runPropertiesResult.stat.exists is defined and runPropertiesResult.stat.exists == true
notify:
Expand All @@ -71,7 +71,7 @@
src: templates/run.properties.j2
dest: /home/{{ payara_user }}/install/authn.anon/run.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
when: runPropertiesResult.stat.exists is defined and runPropertiesResult.stat.exists == false
notify:
Expand All @@ -82,7 +82,7 @@
src: files/logback.xml
dest: /home/{{ payara_user }}/install/authn.anon/logback.xml
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
notify:
- "authn_anon-handler"
Expand Down
16 changes: 8 additions & 8 deletions roles/authn_db/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
extension: "zip"
dest: "/home/{{ payara_user }}/downloads/authn.db-{{ authn_db_version }}-distro.zip"
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
when: packageResult.stat.exists is defined and packageResult.stat.exists == false

Expand All @@ -24,7 +24,7 @@
dest: /home/{{ payara_user }}/install
remote_src: true
owner: '{{ payara_user }}'
group: '{{ payara_user }}'
group: '{{ payara_user_group }}'
when: ansible_local.local.instantiations.authn_db is not defined or ansible_local.local.versions.authn_db != authn_db_version

- name: "Find any war files not matching the current version"
Expand All @@ -50,7 +50,7 @@
src: files/setup.properties
dest: /home/{{ payara_user }}/install/authn.db/setup.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0600
when: setupPropertiesResult.stat.exists is defined and setupPropertiesResult.stat.exists == true
notify:
Expand All @@ -61,7 +61,7 @@
src: templates/mariadb.setup.properties.j2
dest: /home/{{ payara_user }}/install/authn.db/setup.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0600
when: setupPropertiesResult.stat.exists is defined and setupPropertiesResult.stat.exists == false and (ansible_local.local.instantiations.mariadb is defined and ansible_local.local.instantiations.mariadb == 'true')
notify:
Expand All @@ -72,7 +72,7 @@
src: templates/oracle.setup.properties.j2
dest: /home/{{ payara_user }}/install/authn.db/setup.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0600
when: setupPropertiesResult.stat.exists is defined and setupPropertiesResult.stat.exists == false and (ansible_local.local.instantiations.mariadb is not defined or ansible_local.local.instantiations.mariadb == 'false')
notify:
Expand All @@ -88,7 +88,7 @@
src: files/run.properties
dest: /home/{{ payara_user }}/install/authn.db/run.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
when: runPropertiesResult.stat.exists is defined and runPropertiesResult.stat.exists == true
notify:
Expand All @@ -99,7 +99,7 @@
src: templates/run.properties.j2
dest: /home/{{ payara_user }}/install/authn.db/run.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
when: runPropertiesResult.stat.exists is defined and runPropertiesResult.stat.exists == false
notify:
Expand All @@ -110,7 +110,7 @@
src: files/logback.xml
dest: /home/{{ payara_user }}/install/authn.db/logback.xml
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
notify:
- "authn_db-handler"
Expand Down
14 changes: 7 additions & 7 deletions roles/authn_ip_clf/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
url: http://nexus.esc.rl.ac.uk:8081/nexus/service/local/repositories/releases/content/uk/ac/rl/scd/authn.ip_clf/{{ authn_ip_clf_version }}/authn.ip_clf-{{ authn_ip_clf_version }}-distro.zip
dest: /home/{{ payara_user }}/downloads
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
when: packageResult.stat.exists is defined and packageResult.stat.exists == false

Expand All @@ -24,7 +24,7 @@
dest: /home/{{ payara_user }}/install
remote_src: true
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
when: installationResult.stat.exists is defined and installationResult.stat.exists == false

- name: "Check authn_ip_clf-setup.properties file existence"
Expand All @@ -37,7 +37,7 @@
src: files/authn_ip_clf-setup.properties
dest: /home/{{ payara_user }}/install/authn.ip_clf/authn_ip_clf-setup.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0600
when: setupPropertiesResult.stat.exists is defined and setupPropertiesResult.stat.exists == true
notify:
Expand All @@ -48,7 +48,7 @@
src: "{{ role_path }}/../payara/templates/setup.properties.j2"
dest: /home/{{ payara_user }}/install/authn.ip_clf/authn_ip_clf-setup.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0600
when: setupPropertiesResult.stat.exists is defined and setupPropertiesResult.stat.exists == false
notify:
Expand All @@ -64,7 +64,7 @@
src: files/authn_ip_clf.properties
dest: /home/{{ payara_user }}/install/authn.ip_clf/authn_ip_clf.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
when: runPropertiesResult.stat.exists is defined and runPropertiesResult.stat.exists == true
notify:
Expand All @@ -75,7 +75,7 @@
src: templates/authn_ip_clf.properties.j2
dest: /home/{{ payara_user }}/install/authn.ip_clf/authn_ip_clf.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
when: runPropertiesResult.stat.exists is defined and runPropertiesResult.stat.exists == false
notify:
Expand All @@ -86,7 +86,7 @@
src: files/logback.xml
dest: /home/{{ payara_user }}/install/authn.ip_clf/logback.xml
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
notify:
- "authn_ip_clf-handler"
Expand Down
14 changes: 7 additions & 7 deletions roles/authn_ldap/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
extension: "zip"
dest: "/home/{{ payara_user }}/downloads/authn.ldap-{{ authn_ldap_version }}-distro.zip"
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
when: packageResult.stat.exists is defined and packageResult.stat.exists == false

Expand All @@ -24,7 +24,7 @@
dest: /home/{{ payara_user }}/install
remote_src: true
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
when: ansible_local.local.instantiations.authn_ldap is not defined or ansible_local.local.versions.authn_ldap != authn_ldap_version

- name: "Find any war files not matching the current version"
Expand All @@ -50,7 +50,7 @@
src: files/setup.properties
dest: /home/{{ payara_user }}/install/authn.ldap/setup.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0600
when: setupPropertiesResult.stat.exists is defined and setupPropertiesResult.stat.exists == true
notify:
Expand All @@ -61,7 +61,7 @@
src: "{{ role_path }}/../payara/templates/setup.properties.j2"
dest: /home/{{ payara_user }}/install/authn.ldap/setup.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0600
when: setupPropertiesResult.stat.exists is defined and setupPropertiesResult.stat.exists == false
notify:
Expand All @@ -77,7 +77,7 @@
src: file/run.properties
dest: /home/{{ payara_user }}/install/authn.ldap/run.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
when: runPropertiesResult.stat.exists is defined and runPropertiesResult.stat.exists == true
notify:
Expand All @@ -88,7 +88,7 @@
src: templates/run.properties.j2
dest: /home/{{ payara_user }}/install/authn.ldap/run.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
when: runPropertiesResult.stat.exists is defined and runPropertiesResult.stat.exists == false
notify:
Expand All @@ -99,7 +99,7 @@
src: files/logback.xml
dest: /home/{{ payara_user }}/install/authn.ldap/logback.xml
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
notify:
- "authn_ldap-handler"
Expand Down
14 changes: 7 additions & 7 deletions roles/authn_simple/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
extension: "zip"
dest: "/home/{{ payara_user }}/downloads/authn.simple-{{ authn_simple_version }}-distro.zip"
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
when: packageResult.stat.exists is defined and packageResult.stat.exists == false

Expand All @@ -24,7 +24,7 @@
dest: /home/{{ payara_user }}/install
remote_src: true
owner: '{{ payara_user }}'
group: '{{ payara_user }}'
group: '{{ payara_user_group }}'
when: ansible_local.local.instantiations.authn_simple is not defined or ansible_local.local.versions.authn_simple != authn_simple_version

- name: "Find any war files not matching the current version"
Expand All @@ -50,7 +50,7 @@
src: files/setup.properties
dest: /home/{{ payara_user }}/install/authn.simple/setup.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0600
when: setupPropertiesResult.stat.exists is defined and setupPropertiesResult.stat.exists == true
notify:
Expand All @@ -61,7 +61,7 @@
src: "{{ role_path }}/../payara/templates/setup.properties.j2"
dest: /home/{{ payara_user }}/install/authn.simple/setup.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0600
when: setupPropertiesResult.stat.exists is defined and setupPropertiesResult.stat.exists == false
notify:
Expand All @@ -77,7 +77,7 @@
src: files/run.properties
dest: /home/{{ payara_user }}/install/authn.simple/run.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
when: runPropertiesResult.stat.exists is defined and runPropertiesResult.stat.exists == true
notify:
Expand All @@ -88,7 +88,7 @@
src: templates/run.properties.j2
dest: /home/{{ payara_user }}/install/authn.simple/run.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
when: runPropertiesResult.stat.exists is defined and runPropertiesResult.stat.exists == false
notify:
Expand All @@ -99,7 +99,7 @@
src: files/logback.xml
dest: /home/{{ payara_user }}/install/authn.simple/logback.xml
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
notify:
- "authn_simple-handler"
Expand Down
14 changes: 7 additions & 7 deletions roles/authn_uows_clf/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
url: http://nexus.esc.rl.ac.uk:8081/nexus/service/local/repositories/releases/content/uk/ac/rl/scd/authn.uows_clf/{{ authn_uows_clf_version }}/authn.uows_clf-{{ authn_uows_clf_version }}-distro.zip
dest: /home/{{ payara_user }}/downloads
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
when: packageResult.stat.exists is defined and packageResult.stat.exists == false

Expand All @@ -25,7 +25,7 @@
dest: /home/{{ payara_user }}/install
remote_src: true
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
when: installationResult.stat.exists is defined and installationResult.stat.exists == false

- name: "Check authn_uows_clf-setup.properties file existence"
Expand All @@ -38,7 +38,7 @@
src: files/authn_uows_clf-setup.properties
dest: /home/{{ payara_user }}/install/authn.uows_clf/authn_uows_clf-setup.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0600
when: setupPropertiesResult.stat.exists is defined and setupPropertiesResult.stat.exists == true
notify:
Expand All @@ -49,7 +49,7 @@
src: "{{ role_path }}/../payara/templates/setup.properties.j2"
dest: /home/{{ payara_user }}/install/authn.uows_clf/authn_uows_clf-setup.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0600
when: setupPropertiesResult.stat.exists is defined and setupPropertiesResult.stat.exists == false
notify:
Expand All @@ -65,7 +65,7 @@
src: files/authn_uows_clf.properties
dest: /home/{{ payara_user }}/install/authn.uows_clf/authn_uows_clf.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
when: runPropertiesResult.stat.exists is defined and runPropertiesResult.stat.exists == true
notify:
Expand All @@ -76,7 +76,7 @@
src: templates/authn_uows_clf.properties.j2
dest: /home/{{ payara_user }}/install/authn.uows_clf/authn_uows_clf.properties
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
when: runPropertiesResult.stat.exists is defined and runPropertiesResult.stat.exists == false
notify:
Expand All @@ -87,7 +87,7 @@
src: files/logback.xml
dest: /home/{{ payara_user }}/install/authn.uows_clf/logback.xml
owner: "{{ payara_user }}"
group: "{{ payara_user }}"
group: "{{ payara_user_group }}"
mode: 0664
notify:
- "authn_uows_clf-handler"
Expand Down
Loading

0 comments on commit afd5b67

Please sign in to comment.