From 62e7a952c1b352cacedeb0a6c57fa61a1b3f45f9 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 10 Oct 2020 14:03:07 +0200 Subject: [PATCH] fix missing vars error --- tasks/main.yml | 1 - tasks/post.yml | 9 --------- tasks/setup.yml | 7 +++++++ templates/etc/sysconfig/renovate.j2 | 2 ++ 4 files changed, 9 insertions(+), 10 deletions(-) delete mode 100644 tasks/post.yml diff --git a/tasks/main.yml b/tasks/main.yml index faf450c..1f69f7a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,3 +1,2 @@ --- - include_tasks: setup.yml -- include_tasks: post.yml diff --git a/tasks/post.yml b/tasks/post.yml deleted file mode 100644 index 630b1a6..0000000 --- a/tasks/post.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- name: Ensure renovatebot timer is up and running - systemd: - name: renovate.timer - daemon_reload: yes - enabled: yes - state: started - become: True - become_user: root diff --git a/tasks/setup.yml b/tasks/setup.yml index 4c43e36..0c31420 100644 --- a/tasks/setup.yml +++ b/tasks/setup.yml @@ -17,5 +17,12 @@ src: etc/systemd/system/renovate.service.j2 dest: /etc/systemd/system/renovate.service notify: __renovate_restart + + - name: Ensure renovatebot timer is up and running + systemd: + name: renovate.timer + daemon_reload: yes + enabled: yes + state: started become: True become_user: root diff --git a/templates/etc/sysconfig/renovate.j2 b/templates/etc/sysconfig/renovate.j2 index 49f3088..cc08200 100644 --- a/templates/etc/sysconfig/renovate.j2 +++ b/templates/etc/sysconfig/renovate.j2 @@ -6,4 +6,6 @@ RENOVATE_AUTODISCOVER="{{ renovatebot_autodiscover | bool | lower }}" RENOVATE_ENDPOINT="{{ renovatebot_endpoint }}" RENOVATE_GIT_AUTHOR="{{ renovatebot_git_author }}" RENOVATE_PLATFORM="{{ renovatebot_platform }}" +{% if renovatebot_token is defined %} RENOVATE_TOKEN="{{ renovatebot_token }}" +{% endif %}