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

Make some of the j2 templates source configurable #296

Merged
merged 1 commit into from
Nov 18, 2022

Conversation

talek
Copy link
Contributor

@talek talek commented Nov 16, 2022

For some custom/advanced setups it would be nice if we could customize some of the default provided templates. It is the case of motd.j2 template from the common role, sudoers.j2 from the orahost role (if for example I don't want NOPASSWD for sudo or I'd like access to a few commands only) and dotprofile-home.j2 from oraswdb-install role. With the proposed changes I can create for example my own dotprofile-home.j2, place it in my templates/ folder in the root of my playbook directory and set oracle_profile_template to "{{ playbook_dir }}/templates/dotprofile-home.j2". I can do all these manually through some post_tasks, of course, but it would unnecessarily complicate the playbook. Not to mention that generating dotprofile file can't be currently disabled. This patch adds also a new configure_oracle_profile variable to control whether the profile file should be generated.

@Rendanic
Copy link
Collaborator

Looks fine except the default for configure_oracle_profile: true.
The old .profile has some issues and was replaced by ocenv. That's why the default has changed to false.

@talek
Copy link
Contributor Author

talek commented Nov 17, 2022

Hmm... on my default 19c setup I always end up with a .profile_19c file, so I thought this is always generated no matter what. That is why I set the configure_oracle_profile: true, just to ensure backward compatibility. Otherwise, I'm fine with setting it to false as default.

@Rendanic
Copy link
Collaborator

Sorry, you are right. It is installed by default.

I'll place it on the deprecation list, because the old environment has some errors, which I won't fix anymore due to the replacement by `ocenv.

=> PR is fine for me.

@Rendanic Rendanic merged commit 715f83a into oravirt:master Nov 18, 2022
@Rendanic Rendanic removed the question label Nov 18, 2022
@talek talek deleted the template_src branch November 19, 2022 13:19
@Rendanic Rendanic mentioned this pull request Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants