Skip to content
Snippets Groups Projects
Commit f21b3ed7 authored by nimrod's avatar nimrod
Browse files

Merge branch 'master' of /home/nimrod/Documents/Shore/Ansible/ansible-role-example

# Conflicts:
#	meta/main.yml
#	molecule.yml
#	tasks/main.yml
#	tests/test_example.py
parents 46c6943d bd2a4293
No related branches found
No related tags found
No related merge requests found
five: 5
six: 6
eleven: '{{ five + six }}'
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
sha: 6dfcb89af3c9b4d172cc2e5a8a2fa0f54615a338 sha: 7539d8bd1a00a3c1bfd34cdb606d3a6372e83469
hooks: hooks:
- id: check-added-large-files - id: check-added-large-files
- id: check-json - id: check-json
- id: check-xml - id: check-xml
- id: check-yaml - id: check-yaml
- id: check-merge-conflict - id: check-merge-conflict
- repo: https://www.shore.co.il/git/ansible-pre-commit/ - repo: https://www.shore.co.il/git/ansible-pre-commit
sha: 94b506c144d4e22ebc1deef637a818db13bcaca5 sha: v0.4.0
hooks: 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']
...@@ -30,7 +30,7 @@ To install the dependencies: ...@@ -30,7 +30,7 @@ To install the dependencies:
.. code:: shell .. code:: shell
ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles
To run the full test suite: To run the full test suite:
......
[defaults] [defaults]
host_key_checking = False host_key_checking = False
retry_files_enabled = False retry_files_enabled = False
roles_path = .molecule/roles:../ roles_path = roles:../:../../:.molecule/roles
command_warnings = True command_warnings = True
deprecation_warnings = True deprecation_warnings = True
...@@ -21,3 +21,6 @@ vagrant: ...@@ -21,3 +21,6 @@ vagrant:
append_platform_to_hostname: yes append_platform_to_hostname: yes
raw_config_args: raw_config_args:
- 'vm.synced_folder ".", "/vagrant", disabled: true' - 'vm.synced_folder ".", "/vagrant", disabled: true'
- 'vbguest.auto_update = false'
- 'landrush.enabled = false'
- 'landrush_ip.override = false'
--- ---
# tasks file for ansible-role-ufw # tasks file for ansible-role-ufw
- name: Assertions
- name: Assert
assert: assert:
that: ansible_pkg_mgr == 'apt' that: ansible_pkg_mgr == 'apt'
......
def test_example(Command):
assert Command('uname').rc == 0
def test_root(Command, Sudo):
with Sudo():
assert Command('whoami').stdout == 'root'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment