Loading .pre-commit-config.yaml +14 −4 Original line number Diff line number Diff line - repo: https://github.com/pre-commit/pre-commit-hooks sha: 6dfcb89af3c9b4d172cc2e5a8a2fa0f54615a338 sha: 7539d8bd1a00a3c1bfd34cdb606d3a6372e83469 hooks: - id: check-added-large-files - id: check-json - id: check-xml - id: check-yaml - id: check-merge-conflict - repo: https://www.shore.co.il/git/ansible-pre-commit/ sha: 94b506c144d4e22ebc1deef637a818db13bcaca5 - repo: https://www.shore.co.il/git/ansible-pre-commit sha: v0.4.0 hooks: - id: ansible-pre-commit - id: ansible-syntax-check always_run: true files: tests/playbook.yml args: ['tests/playbook.yml'] - repo: https://github.com/willthames/ansible-lint sha: v3.4.4 hooks: - id: ansible-lint always_run: true files: tests/playbook.yml args: ['tests/playbook.yml'] ansible.cfg +1 −1 Original line number Diff line number Diff line [defaults] host_key_checking = False retry_files_enabled = False roles_path = roles:../../ roles_path = roles:../:../../:.molecule/roles command_warnings = True deprecation_warnings = True molecule.yml +4 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ vagrant: type: virtualbox platforms: - name: openbsd box: kaorimatz/openbsd-5.9-amd64 box: kaorimatz/openbsd-6.0-amd64 - name: debian box: debian/jessie64 instances: Loading @@ -23,3 +23,6 @@ vagrant: append_platform_to_hostname: yes raw_config_args: - 'vm.synced_folder ".", "/vagrant", disabled: true' - 'vbguest.auto_update = false' - 'landrush.enabled = false' - 'landrush_ip.override = false' tasks/main.yml +2 −1 Original line number Diff line number Diff line --- # tasks file for ansible-role-nsd - assert: - name: Assertions assert: that: - ansible_os_family in [ 'Debian', 'OpenBSD' ] Loading tests/test_example.py 0 → 100644 +7 −0 Original line number Diff line number Diff line def test_example(Command): assert Command('uname').rc == 0 def test_root(Command, Sudo): with Sudo(): assert Command('whoami').stdout == 'root' Loading
.pre-commit-config.yaml +14 −4 Original line number Diff line number Diff line - repo: https://github.com/pre-commit/pre-commit-hooks sha: 6dfcb89af3c9b4d172cc2e5a8a2fa0f54615a338 sha: 7539d8bd1a00a3c1bfd34cdb606d3a6372e83469 hooks: - id: check-added-large-files - id: check-json - id: check-xml - id: check-yaml - id: check-merge-conflict - repo: https://www.shore.co.il/git/ansible-pre-commit/ sha: 94b506c144d4e22ebc1deef637a818db13bcaca5 - repo: https://www.shore.co.il/git/ansible-pre-commit sha: v0.4.0 hooks: - id: ansible-pre-commit - id: ansible-syntax-check always_run: true files: tests/playbook.yml args: ['tests/playbook.yml'] - repo: https://github.com/willthames/ansible-lint sha: v3.4.4 hooks: - id: ansible-lint always_run: true files: tests/playbook.yml args: ['tests/playbook.yml']
ansible.cfg +1 −1 Original line number Diff line number Diff line [defaults] host_key_checking = False retry_files_enabled = False roles_path = roles:../../ roles_path = roles:../:../../:.molecule/roles command_warnings = True deprecation_warnings = True
molecule.yml +4 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ vagrant: type: virtualbox platforms: - name: openbsd box: kaorimatz/openbsd-5.9-amd64 box: kaorimatz/openbsd-6.0-amd64 - name: debian box: debian/jessie64 instances: Loading @@ -23,3 +23,6 @@ vagrant: append_platform_to_hostname: yes raw_config_args: - 'vm.synced_folder ".", "/vagrant", disabled: true' - 'vbguest.auto_update = false' - 'landrush.enabled = false' - 'landrush_ip.override = false'
tasks/main.yml +2 −1 Original line number Diff line number Diff line --- # tasks file for ansible-role-nsd - assert: - name: Assertions assert: that: - ansible_os_family in [ 'Debian', 'OpenBSD' ] Loading
tests/test_example.py 0 → 100644 +7 −0 Original line number Diff line number Diff line def test_example(Command): assert Command('uname').rc == 0 def test_root(Command, Sudo): with Sudo(): assert Command('whoami').stdout == 'root'