Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Consider abstracting paths from deployment.yml #1

Open
rhmk opened this issue Apr 27, 2018 · 0 comments
Open

Consider abstracting paths from deployment.yml #1

rhmk opened this issue Apr 27, 2018 · 0 comments

Comments

@rhmk
Copy link
Member

rhmk commented Apr 27, 2018

Issue by kyleabenson
Sunday Feb 11, 2018 at 07:50 GMT
Originally opened as rhmk/ansible-hana-examples#30


Currently there is a lot of hardcoding of paths in deployment > tasks > deployment.yml, for example:

- name: create usr sap directory
  file:
    path: "/usr/sap/{{ item.value.hana_sid|upper }}"
    state: directory
  with_dict: "{{ instances }}"

I count that path 3 times in that file, so we could do something like:

var: 
  sap_usr_path: /usr/sap/{{ item.value.hana_sid|upper }}

This would improve legibility and reduce the number of manual paths, so it becomes easier to modify in the future if necessary. This is generally a good practice from a role reuse perspective.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant