Loading .pre-commit-config.yaml +17 −4 Original line number Diff line number Diff line Loading @@ -6,17 +6,30 @@ - id: check-xml - id: check-yaml - id: check-merge-conflict - id: flake8 - id: check-symlinks - repo: https://www.shore.co.il/git/ansible-pre-commit sha: v0.4.0 sha: 0fadd691465b97db8992cfc66650f630e433324b hooks: - id: ansible-syntax-check always_run: true files: tests/playbook.yml args: ['tests/playbook.yml'] args: - tests/playbook.yml - repo: https://github.com/willthames/ansible-lint sha: v3.4.4 sha: 959ab0f525e9abb19cf75f34381015cf33695f61 hooks: - id: ansible-lint always_run: true files: tests/playbook.yml args: ['tests/playbook.yml'] args: - tests/playbook.yml - repo: local hooks: - id: piprot name: piprot description: Check up-to-date Python requirements language: system entry: piprot --quiet --outdated tests/requirements.txt files: requirements.txt always_run: true README.rst +9 −4 Original line number Diff line number Diff line Loading @@ -6,7 +6,8 @@ An Ansible role for installing and configuring an NTP client. Requirements ------------ See :code:`meta/main.yml` and assertions at top of :code:`tasks/main.yml`. See :code:`meta/main.yml`, :code:`tests/requirements.yml` and assertions at the top of :code:`tasks/main.yml`. Role Variables -------------- Loading @@ -26,17 +27,21 @@ See :code:`tests/playbook.yml`. Testing ------- To install the dependencies: Testing requires Virtualbox and Vagrant and Python 2.7. Install the Python dependencies, add pre-commit hooks by running: .. code:: shell ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles pip install -r tests/requirements.txt pre-commit install To run the full test suite: .. code:: shell molecule test ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles molecule test --platform all pre-commit run --all-files License ------- Loading ansible.cfg +5 −1 Original line number Diff line number Diff line [defaults] library = library host_key_checking = False retry_files_enabled = False roles_path = roles:../:../../:.molecule/roles roles_path = .molecule/roles:.molecule/../roles:../:../../ command_warnings = True deprecation_warnings = True [ssh_connection] pipelining = True library/__init__.py 0 → 100644 +0 −0 Empty file added. molecule.yml +4 −6 Original line number Diff line number Diff line --- ansible: verbose: v verbose: vv playbook: tests/playbook.yml diff: True molecule: testinfra_dir: tests ansible_config_template: ansible.cfg config_file: ../ansible.cfg requirements_file: tests/requirements.yml vagrant: providers: Loading @@ -18,7 +16,7 @@ vagrant: - name: debian box: debian/jessie64 - name: ubuntu box: ubuntu/trusty64 box: ubuntu/xenial64 instances: - name: ansible-role-ntp-client options: Loading Loading
.pre-commit-config.yaml +17 −4 Original line number Diff line number Diff line Loading @@ -6,17 +6,30 @@ - id: check-xml - id: check-yaml - id: check-merge-conflict - id: flake8 - id: check-symlinks - repo: https://www.shore.co.il/git/ansible-pre-commit sha: v0.4.0 sha: 0fadd691465b97db8992cfc66650f630e433324b hooks: - id: ansible-syntax-check always_run: true files: tests/playbook.yml args: ['tests/playbook.yml'] args: - tests/playbook.yml - repo: https://github.com/willthames/ansible-lint sha: v3.4.4 sha: 959ab0f525e9abb19cf75f34381015cf33695f61 hooks: - id: ansible-lint always_run: true files: tests/playbook.yml args: ['tests/playbook.yml'] args: - tests/playbook.yml - repo: local hooks: - id: piprot name: piprot description: Check up-to-date Python requirements language: system entry: piprot --quiet --outdated tests/requirements.txt files: requirements.txt always_run: true
README.rst +9 −4 Original line number Diff line number Diff line Loading @@ -6,7 +6,8 @@ An Ansible role for installing and configuring an NTP client. Requirements ------------ See :code:`meta/main.yml` and assertions at top of :code:`tasks/main.yml`. See :code:`meta/main.yml`, :code:`tests/requirements.yml` and assertions at the top of :code:`tasks/main.yml`. Role Variables -------------- Loading @@ -26,17 +27,21 @@ See :code:`tests/playbook.yml`. Testing ------- To install the dependencies: Testing requires Virtualbox and Vagrant and Python 2.7. Install the Python dependencies, add pre-commit hooks by running: .. code:: shell ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles pip install -r tests/requirements.txt pre-commit install To run the full test suite: .. code:: shell molecule test ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles molecule test --platform all pre-commit run --all-files License ------- Loading
ansible.cfg +5 −1 Original line number Diff line number Diff line [defaults] library = library host_key_checking = False retry_files_enabled = False roles_path = roles:../:../../:.molecule/roles roles_path = .molecule/roles:.molecule/../roles:../:../../ command_warnings = True deprecation_warnings = True [ssh_connection] pipelining = True
molecule.yml +4 −6 Original line number Diff line number Diff line --- ansible: verbose: v verbose: vv playbook: tests/playbook.yml diff: True molecule: testinfra_dir: tests ansible_config_template: ansible.cfg config_file: ../ansible.cfg requirements_file: tests/requirements.yml vagrant: providers: Loading @@ -18,7 +16,7 @@ vagrant: - name: debian box: debian/jessie64 - name: ubuntu box: ubuntu/trusty64 box: ubuntu/xenial64 instances: - name: ansible-role-ntp-client options: Loading