mirror of
https://github.com/roles-ansible/ansible_role_restic/
synced 2024-11-09 21:33:31 +01:00
Merge pull request #85 from roles-ansible/linting
update molecule linting
This commit is contained in:
commit
e41e115291
7 changed files with 32 additions and 25 deletions
|
@ -2,10 +2,10 @@
|
|||
- name: Converge
|
||||
hosts: all
|
||||
roles:
|
||||
- {role: ansible_role_restic}
|
||||
- {role: ../../}
|
||||
pre_tasks:
|
||||
- name: install bzip2
|
||||
package:
|
||||
- name: Install bzip2
|
||||
ansible.builtin.package:
|
||||
name: bzip2
|
||||
state: present
|
||||
vars:
|
||||
|
@ -36,10 +36,10 @@
|
|||
- name: Converge with dict
|
||||
hosts: all
|
||||
roles:
|
||||
- role: ansible_role_restic
|
||||
- {role: ../../}
|
||||
pre_tasks:
|
||||
- name: install bzip2
|
||||
package:
|
||||
- name: Install bzip2
|
||||
ansible.builtin.package:
|
||||
name: bzip2
|
||||
state: present
|
||||
vars:
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
- name: "include tasks for testing backup files"
|
||||
include_tasks: "test_backup_files.yml"
|
||||
- name: "Include tasks for testing backup files"
|
||||
ansible.builtin.include_tasks: "test_backup_files.yml"
|
||||
|
||||
- name: "include tasks for testing access files"
|
||||
include_tasks: "test_access_files.yml"
|
||||
- name: "Include tasks for testing access files"
|
||||
ansible.builtin.include_tasks: "test_access_files.yml"
|
||||
|
||||
- name: "include tasks for testing restic link"
|
||||
include_tasks: "test_restic_link.yml"
|
||||
- name: "Include tasks for testing restic link"
|
||||
ansible.builtin.include_tasks: "test_restic_link.yml"
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
---
|
||||
- name: Stat test access file
|
||||
stat:
|
||||
ansible.builtin.stat:
|
||||
path: /opt/restic/access-test.sh
|
||||
register: test_file
|
||||
|
||||
- name: Check that the test access file exists
|
||||
assert:
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- test_file.stat.exists
|
||||
|
||||
- name: Stat test_stdin access file
|
||||
stat:
|
||||
ansible.builtin.stat:
|
||||
path: /opt/restic/access-test_stdin.sh
|
||||
register: test_stdin_file
|
||||
|
||||
- name: Check that the test_stdin access file exists
|
||||
assert:
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- test_stdin_file.stat.exists
|
||||
|
|
|
@ -1,27 +1,31 @@
|
|||
---
|
||||
- name: Stat test backup file
|
||||
stat:
|
||||
ansible.builtin.stat:
|
||||
path: /opt/restic/backup-test.sh
|
||||
register: test_file
|
||||
|
||||
- name: Check that the test backup file exists
|
||||
assert:
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- test_file.stat.exists
|
||||
|
||||
- name: Stat test_stdin backup file
|
||||
stat:
|
||||
ansible.builtin.stat:
|
||||
path: /opt/restic/backup-test_stdin.sh
|
||||
register: test_stdin_file
|
||||
|
||||
- name: Check that the test_stdin backup file exists
|
||||
assert:
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- test_stdin_file.stat.exists
|
||||
|
||||
- name: Run the backup scripts
|
||||
shell: "./{{ item }}"
|
||||
ansible.builtin.shell: "./{{ item }}"
|
||||
args:
|
||||
chdir: /opt/restic/
|
||||
with_items:
|
||||
- backup-dicttest.sh
|
||||
- backup-test.sh
|
||||
- backup-test_stdin.sh
|
||||
changed_when: true
|
||||
tags: skip_ansible_lint_rule_command-instead-of-shell
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
---
|
||||
- name: Stat test restic link
|
||||
stat:
|
||||
ansible.builtin.stat:
|
||||
path: ~/restic/restic
|
||||
register: restic_link
|
||||
|
||||
- name: Check that the test restic link exists
|
||||
assert:
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- restic_link.stat.exists
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
hosts: all
|
||||
tasks:
|
||||
- name: "Include test_alpha-services"
|
||||
include_role:
|
||||
ansible.builtin.include_role:
|
||||
name: "test_restic"
|
||||
|
|
|
@ -10,5 +10,5 @@ restic_os_variables:
|
|||
paths:
|
||||
- 'vars'
|
||||
|
||||
playbook_version_number: 25 # should be int
|
||||
playbook_version_number: 26 # should be int
|
||||
playbook_version_path: 'do1jlr.restic.version'
|
||||
|
|
Loading…
Reference in a new issue