-
Notifications
You must be signed in to change notification settings - Fork 121
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
Support PVC storage for containerized Ansible Tower running on OCP #590
Conversation
@@ -0,0 +1,52 @@ | |||
--- | |||
- block: | |||
- name: Ensure user is authenticated with OCP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This step is already performed in the openshift_retrieve_token
, so shouldn't be needed here - probably just remove this task(?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved the authentication part to a separate file, but in the case that only OCP token is provided we need to have a step for login. openshift_retrieve_token was only used when username and password was provided, it did not cover the token based authentication.
register: getProject | ||
failed_when: false | ||
|
||
- name: Creating target project.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be a left-over, but there's one oc get project
above and two oc new-project
here - seems a bit redundant + not sure what this task actually does as it registers getProject
over again.
Another couple of comments:
- Probably doesn't make sense to have the project created inside of
setup_pvc
as that's a bit "hidden". Better idea would be to do so in themain.yml
or a separate file for creating the project - What happens if the project already exists, but belongs to someone else? Probably will error out at some point. Is this something we should check for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, that was overlooked and it has been fixed, I've also changed the file structure to be a bit more clean and self-explanatory. I will also look into handling the the condition in which project has already been created by other user.
roles/ansible/tower/config-ansible-tower-ocp/tasks/setup_pvc.yml
Outdated
Show resolved
Hide resolved
* Changed the template handling for PVC * Unified PVC variables naming * Added explicit login for token based OCP authentication
*Single quotes on OCP login creds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What does this PR do?
This PR extends the already present config-ansible-tower-ocp role with cability of automatic deployment of PVC for PostgreSQL persistent storage.
How should this be tested?
Please see test directory for instructions and test inventory
Is there a relevant Issue open for this?
N/A
Other Relevant info, PRs, etc.
N/A
People to notify
cc: @redhat-cop/infra-ansible
@oybed