From 04a15f57e866184405bb5477e47c606cef549f14 Mon Sep 17 00:00:00 2001 From: Kelley Spoon Date: Tue, 2 Oct 2018 10:58:29 -0500 Subject: Gitolite: remove redundant when statements The gitolite role is only run when hosttype == "git-main", therefor the 'when: hosttype == "git-main"' are unnecessary. Change-Id: I95656d48b91f2b613effaecf994fe558257d7c5a Reviewed-on: https://review.linaro.org/28557 Reviewed-by: Riku Voipio Reviewed-by: Benjamin Copeland --- roles/gitolite/tasks/gitolite-install.yml | 5 ----- roles/gitolite/tasks/main.yml | 1 - 2 files changed, 6 deletions(-) diff --git a/roles/gitolite/tasks/gitolite-install.yml b/roles/gitolite/tasks/gitolite-install.yml index 5098e12c..7124b5ca 100644 --- a/roles/gitolite/tasks/gitolite-install.yml +++ b/roles/gitolite/tasks/gitolite-install.yml @@ -16,7 +16,6 @@ owner: "{{git_user}}" group: "{{git_user}}" mode: 0750 - when: hosttype == 'git-main' with_items: - /srv/gitolite/ - /srv/gitolite/logs/ @@ -31,7 +30,6 @@ owner={{ git_user }} group={{ git_user }} force=yes - when: hosttype == 'git-main' - name: Create local hooks directory file: state=directory @@ -39,7 +37,6 @@ owner={{ git_user }} group={{ git_user }} mode=0750 - when: hosttype == 'git-main' - name: Create symlink to the repositories directory file: state=link @@ -48,7 +45,6 @@ owner={{ git_user }} group={{ git_user }} force=yes - when: hosttype == 'git-main' - name: Clone gitolite repository git: repo=git://github.com/sitaramc/gitolite @@ -57,7 +53,6 @@ accept_hostkey=yes become: true become_user: "{{git_user}}" - when: hosttype == "git-main" notify: gitolite-installation - name: Initialize gitolite repo diff --git a/roles/gitolite/tasks/main.yml b/roles/gitolite/tasks/main.yml index 8ff0a82b..bcbaf044 100644 --- a/roles/gitolite/tasks/main.yml +++ b/roles/gitolite/tasks/main.yml @@ -7,6 +7,5 @@ owner={{ git_user }} group={{ git_user }} mode=0640 - when: hosttype == 'git-main' - include_tasks: gitolite-tools.yml -- cgit v1.2.3