diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..dfa4e14dfe02741928c7515930fe3e606916a6cd --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,11 @@ +--- +before: + script: + - apt install python-pip + - pip install ansible + - ansible --version + - printf '[defaults]\nroles_path=../' >ansible.cfg + +playbook: + script: + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 36bbf6208cfd42ac91bfbe7f9126bc9044e186c6..0000000000000000000000000000000000000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -language: python -python: "2.7" - -# Use the new container infrastructure -sudo: false - -# Install ansible -addons: - apt: - packages: - - python-pip - -install: - # Install ansible - - pip install ansible - - # Check ansible version - - ansible --version - - # Create ansible.cfg with correct roles_path - - printf '[defaults]\nroles_path=../' >ansible.cfg - -script: - # Basic role syntax check - - ansible-playbook tests/test.yml -i tests/inventory --syntax-check - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/tests/inventory b/tests/inventory new file mode 100644 index 0000000000000000000000000000000000000000..d18580b3c364645735235c667c2a546e28c273bb --- /dev/null +++ b/tests/inventory @@ -0,0 +1 @@ +localhost \ No newline at end of file diff --git a/tests/test.yml b/tests/test.yml new file mode 100644 index 0000000000000000000000000000000000000000..e99fa9e4f73b9a626bde5604a02b5982dd30bfe5 --- /dev/null +++ b/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - nginx-server