fix testing
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Robert Kaussow 2020-10-10 15:01:49 +02:00
parent 92d5c9d8ed
commit b07226127c
Signed by: xoxys
GPG Key ID: 65362AE74AF98B61
6 changed files with 11 additions and 11 deletions

View File

@ -1,6 +1,7 @@
--- ---
# @var renovatebot_image:description: Docker image to use. # @var renovatebot_image:description: Docker image to use.
renovatebot_image: renovate/renovate:latest renovatebot_image: renovate/renovate:latest
renovatebot_service_stopped: False
# @var renovatebot_interval:description: Interval for the systemd timer. # @var renovatebot_interval:description: Interval for the systemd timer.
renovatebot_interval: daily renovatebot_interval: daily

View File

@ -1,7 +1,7 @@
--- ---
- name: Restart docker-renovate - name: Restart docker-renovate
systemd: systemd:
state: restarted state: "{{ renovatebot_service_stopped | ternary('stopped', 'restarted', 'restarted') }}"
daemon_reload: yes daemon_reload: yes
name: renovate name: renovate
listen: __renovate_restart listen: __renovate_restart

View File

@ -8,6 +8,8 @@
- epel-release - epel-release
- python-pip - python-pip
- python-virtualenv - python-virtualenv
renovatebot_service_stopped: True
renovatebot_token: personal-access-token
roles: roles:
- role: xoxys.docker_engine - role: xoxys.docker_engine

View File

@ -12,5 +12,4 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
def test_renovate_running_and_enabled(host): def test_renovate_running_and_enabled(host):
service = host.service("renovate.timer") service = host.service("renovate.timer")
assert service.is_running
assert service.is_enabled assert service.is_enabled

View File

@ -23,6 +23,6 @@
name: renovate.timer name: renovate.timer
daemon_reload: yes daemon_reload: yes
enabled: yes enabled: yes
state: started state: "{{ renovatebot_service_stopped | ternary('stopped', 'started', 'started') }}"
become: True become: True
become_user: root become_user: root

View File

@ -2,12 +2,10 @@
{{ ansible_managed | comment }} {{ ansible_managed | comment }}
{% if renovatebot_github_token is defined %} {% if renovatebot_github_token is defined %}
GITHUB_COM_TOKEN="{{ renovatebot_github_token }}" GITHUB_COM_TOKEN={{ renovatebot_github_token }}
{% endif %}
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 %} {% endif %}
RENOVATE_AUTODISCOVER={{ renovatebot_autodiscover | bool | lower }}
RENOVATE_ENDPOINT={{ renovatebot_endpoint }}
RENOVATE_GIT_AUTHOR={{ renovatebot_git_author }}
RENOVATE_PLATFORM={{ renovatebot_platform }}
RENOVATE_TOKEN={{ renovatebot_token }}