Skip to content

Commit

Permalink
Merge pull request #4 from metabrainz/doc-create-zk-mkroot
Browse files Browse the repository at this point in the history
Document assumptions made to create ZK chroot
  • Loading branch information
atj authored Jun 18, 2024
2 parents 442c932 + 33b3339 commit 4c8ca39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tasks/cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@
- "{{ solr_zk_chroot }}"
when: solr_zk_chroot | d()
register: _solr_zk_mkroot
# If the directory exists the command does nothing and errors with "KeeperErrorCode = NodeExists",
# otherwise it creates the directory and returns a success code without this error message.
changed_when:
- _solr_zk_mkroot.rc == 0
- '"KeeperErrorCode" not in _solr_zk_mkroot.stderr'
# If the command errors with another message than above, fail the task.
failed_when:
- _solr_zk_mkroot.rc != 0
- '"KeeperErrorCode = NodeExists" not in _solr_zk_mkroot.stderr'
Expand Down

0 comments on commit 4c8ca39

Please sign in to comment.