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

polish openshift-master role #4947

Merged

Conversation

ingvagabund
Copy link
Member

Let's make the code more readable and closer to "best practices" of writing the Ansible.

@ingvagabund ingvagabund force-pushed the polish-openshift-master-role branch from f5653bb to 1e870f3 Compare July 31, 2017 10:06
@@ -57,39 +67,43 @@
args:
creates: "{{ openshift_master_policy }}"
notify:
- restart master
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always confused by the indentation. This looks ugly to me but maybe it should be this way. Any justification why beside readability?

failed_when: false
changed_when: false
register: already_set
- name: check whether our docker-registry setting exists in the env file
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tbielawa undoing your change. Even if the Ansible docs shows as correct, I don't like it.

[1] http://docs.ansible.com/ansible/latest/playbooks_blocks.html#id1

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No matter which style we choose I would like to have that documented here [1]. Including indentation in both block and notify.

[1] https://github.com/openshift/openshift-ansible/blob/master/docs/best_practices_guide.adoc

@ingvagabund
Copy link
Member Author

aos-ci-test

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.6_NOT_containerized, aos-ci-jenkins/OS_3.6_NOT_containerized_e2e_tests" for 1e870f3 (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.6_containerized, aos-ci-jenkins/OS_3.6_containerized_e2e_tests" for 1e870f3 (logs)

@smarterclayton
Copy link
Contributor

Can you layer this after #4832 (which removes a significant chunk of code, some of which you touch)?

Copy link
Contributor

@tbielawa tbielawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

name: "{{ openshift.common.service_type }}-master-api"
state: restarted
when:
- openshift.master.ha is defined and openshift.master.ha | bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ❤️ the changes to ANDing in list format

- restart master
- restart master api
- restart master controllers
- restart master
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for consistency in indentation


- command: systemctl daemon-reload
when: create_ha_unit_files | changed
when: l_create_ha_unit_files | changed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for fixing the variable names to match convention!

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 6, 2017
@ingvagabund ingvagabund force-pushed the polish-openshift-master-role branch from 1e870f3 to 8144f53 Compare August 16, 2017 07:51
@ingvagabund
Copy link
Member Author

aos-ci-test

@openshift-bot
Copy link

error: aos-ci-jenkins/OS_3.6_NOT_containerized for 8144f53 (logs)

@openshift-bot
Copy link

error: aos-ci-jenkins/OS_3.6_containerized for 8144f53 (logs)

@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 16, 2017
@ingvagabund ingvagabund force-pushed the polish-openshift-master-role branch from 8144f53 to 13c0075 Compare August 16, 2017 09:49
@ingvagabund
Copy link
Member Author

aos-ci-test

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.6_NOT_containerized, aos-ci-jenkins/OS_3.6_NOT_containerized_e2e_tests" for 13c0075 (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.6_containerized, aos-ci-jenkins/OS_3.6_containerized_e2e_tests" for 13c0075 (logs)

@ingvagabund
Copy link
Member Author

@smarterclayton so you know. @tbielawa can you re-review the PR one more time?

@ingvagabund
Copy link
Member Author

[test]

@openshift-bot
Copy link

Evaluated for openshift ansible test up to 13c0075

@openshift-bot
Copy link

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_openshift_ansible/457/) (Base Commit: b2b9e5e) (PR Branch Commit: 13c0075)

Copy link
Contributor

@tbielawa tbielawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still lgtm

@sdodson
Copy link
Member

sdodson commented Aug 16, 2017

[merge]

@openshift-bot
Copy link

Evaluated for openshift ansible merge up to 13c0075

@openshift-bot
Copy link

openshift-bot commented Aug 17, 2017

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_openshift_ansible/868/) (Base Commit: a61da58) (PR Branch Commit: 13c0075)

@openshift-bot openshift-bot merged commit 22fc8d8 into openshift:master Aug 17, 2017
@ingvagabund ingvagabund deleted the polish-openshift-master-role branch August 17, 2017 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants