Import ansible-role-nginx into OpenStack

Change-Id: Id9c4f591eb5e6e19aeea263e3a8f24cb778aacbe
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2016-02-15 16:08:39 -05:00
parent a89bf0f572
commit d63a602565
4 changed files with 33 additions and 23 deletions

4
.gitreview Normal file
View File

@ -0,0 +1,4 @@
[gerrit]
host=review.openstack.org
port=29418
project=openstack/ansible-role-nginx.git

View File

@ -13,11 +13,11 @@
# under the License.
---
- name: Validate nginx
become: yes
shell: /usr/sbin/nginx -t -c /etc/nginx/nginx.conf
sudo: yes
- name: Restart nginx
become: yes
service:
name: nginx
state: restarted
sudo: yes

View File

@ -16,10 +16,10 @@
include_vars: "{{ ansible_os_family }}.yaml"
- include: install.yaml
sudo: yes
become: yes
- include: config.yaml
sudo: yes
become: yes
- include: service.yaml
sudo: yes
become: yes

42
tox.ini
View File

@ -1,24 +1,16 @@
[tox]
minversion = 1.6
envlist = ansible-lint,docs,pep8
minversion = 1.4.2
envlist = docs,linters
skipsdist = True
[testenv]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:ansible-lint]
setenv =
ANSIBLE_CONFIG = tests/ansible.cfg
whitelist_externals = bash
commands =
bash -c "find . -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \
ansible-lint"
bash -c "find tests -type f -regex '.*.y[a]?ml' -print | xargs -t -n1 \
ansible-playbook --syntax-check -i tests/inventory \
-e rolename=$(basename $(pwd)) > /dev/null"
[testenv:docs]
commands = python setup.py build_sphinx
[testenv:ansible-functional]
[testenv:functional]
commands =
ansible-playbook -i tests/inventory tests/test.yaml
passenv = HOME
@ -26,11 +18,25 @@ setenv =
ANSIBLE_CONFIG = {toxinidir}/tests/ansible.cfg
PYTHONUNBUFFERED = 1
[testenv:docs]
commands = python setup.py build_sphinx
[testenv:pep8]
commands = flake8
[testenv:linters]
setenv =
ANSIBLE_CONFIG = tests/ansible.cfg
whitelist_externals = bash
commands =
flake8
bash -c "find . -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \
ansible-lint"
bash -c "find tests -type f -regex '.*.y[a]?ml' -print | xargs -t -n1 \
ansible-playbook --syntax-check -i tests/inventory \
-e rolename=$(basename $(pwd)) > /dev/null"
[testenv:venv]
commands = {posargs}
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build