fix some ansible-lint errors
This commit is contained in:
@@ -11,18 +11,18 @@
|
||||
- name: "Include default vars"
|
||||
ansible.builtin.include_vars:
|
||||
dir: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/defaults/"
|
||||
extensions: [ 'yml' ]
|
||||
extensions: ['yml']
|
||||
|
||||
- name: "Check if Borg is installed"
|
||||
changed_when: false
|
||||
register: borg_installed_version
|
||||
register: borgmatic_installed_version
|
||||
ansible.builtin.command: "/usr/bin/borg --version"
|
||||
|
||||
- name: "Check Borg version"
|
||||
ansible.builtin.assert:
|
||||
that: borg_installed_version.stdout.find(borg_version)
|
||||
success_msg: "borg version {{ borg_version }} is installed and working"
|
||||
fail_msg: "borg version {{ borg_version }} is not installed or not working correctly"
|
||||
that: borgmatic_installed_version.stdout.find(borgmatic_version)
|
||||
success_msg: "borg version {{ borgmatic_version }} is installed and working"
|
||||
fail_msg: "borg version {{ borgmatic_version }} is not installed or not working correctly"
|
||||
|
||||
- name: "Check if Borgmatic is installed"
|
||||
changed_when: false
|
||||
@@ -31,18 +31,18 @@
|
||||
cmd: "/usr/bin/borgmatic --version"
|
||||
|
||||
- name: "Check that the test repo was created"
|
||||
register: test_repo_readme
|
||||
failed_when: test_repo_readme.stat.exists is false
|
||||
register: borgmatic_test_repo_readme
|
||||
failed_when: borgmatic_test_repo_readme.stat.exists is false
|
||||
ansible.builtin.stat:
|
||||
path: "{{ repo_path }}"
|
||||
|
||||
- name: "Check that the systemd timer for Borgmatic is up and running"
|
||||
register: timer
|
||||
register: borgmatic_timer
|
||||
ansible.builtin.systemd:
|
||||
name: borgmatic.timer
|
||||
|
||||
- name: "Assert that the timer is running"
|
||||
ansible.builtin.assert:
|
||||
that: timer.status.ActiveState == "active"
|
||||
that: borgmatic_timer.status.ActiveState == "active"
|
||||
success_msg: "Timer is running"
|
||||
fail_msg: "Unexpected timer state: '{{ timer.status.ActiveState }}'"
|
||||
fail_msg: "Unexpected timer state: '{{ borgmatic_timer.status.ActiveState }}'"
|
||||
|
||||
Reference in New Issue
Block a user