...
 
Commits (11)
......@@ -2,24 +2,12 @@
path = molecule/infrastructure/roles/ansible-role-docker
url = https://github.com/geerlingguy/ansible-role-docker
branch = 2.5.2
[submodule "roles/debops.etc_aliases"]
path = molecule/postfix/roles/debops.etc_aliases
url = https://github.com/debops/ansible-etc_aliases
[submodule "roles/debops.secret"]
path = molecule/postfix/roles/debops.secret
url = https://github.com/debops/ansible-secret
[submodule "roles/debops.postfix"]
path = molecule/postfix/roles/debops.postfix
url = https://github.com/debops/ansible-postfix
[submodule "roles/debops.ansible_plugins"]
path = molecule/postfix/roles/debops.ansible_plugins
url = https://github.com/debops/ansible-ansible_plugins
[submodule "molecule/postfix/roles/ansible-opendkim"]
path = molecule/postfix/roles/debops.opendkim
url = https://github.com/debops/ansible-opendkim
[submodule "molecule/jdauphant.nginx/roles/jdauphant.nginx"]
path = molecule/jdauphant.nginx/roles/jdauphant.nginx
url = https://github.com/jdauphant/ansible-role-nginx.git
[submodule "molecule/wazuh/wazuh-ansible"]
path = molecule/wazuh/wazuh-ansible
url = https://lab.enough.community/main/wazuh-ansible
[submodule "molecule/debops"]
path = molecule/debops
url = https://github.com/debops/debops
FROM debian:buster
RUN apt-get update && \
apt-get install --quiet -y curl virtualenv python2 gcc libssl-dev python-dev make
apt-get install --quiet -y curl virtualenv python3 gcc libssl-dev python3-dev make
RUN curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh
WORKDIR /opt
RUN virtualenv venv
RUN virtualenv --python=python3 venv
ENV PATH="/opt/venv/bin:${PATH}"
from StringIO import StringIO
from io import StringIO
import sh
......
......@@ -4,7 +4,7 @@ driver:
lint:
name: yamllint
platforms:
- name: backup-host
- name: bind-host
flavor: "s1-2"
- name: weblate-host
flavor: "s1-2"
......@@ -14,7 +14,7 @@ provisioner:
name: ansible
options:
i: ../../inventories/common/firewall.yml,../../inventories/common/02-all.yml
limit: backup-host,weblate-host,localhost
limit: bind-host,weblate-host,localhost
lint:
name: ansible-lint
env:
......
testinfra_hosts = ['backup-host']
testinfra_hosts = ['bind-host']
def expected_backups(host, count):
......
......@@ -38,7 +38,7 @@ def test_dig_update(host):
domain = host.run("hostname -d").stdout.strip()
hostname = host.run("hostname -s").stdout.strip()
cmd = host.run("dig +short TXT {}.test.{}".format(hostname, domain))
print (cmd.stdout.strip())
print(cmd.stdout.strip())
assert 0 == cmd.rc
assert "Updated by nsupdate" in cmd.stdout.strip()
......
from enough.common import retry
testinfra_hosts = ['chat-host']
......@@ -5,6 +7,10 @@ def test_mattermost(host):
with host.sudo():
host.run("apt-get install -y curl")
r = host.run("curl -s -m 5 https://chat.$(hostname -d)")
assert r.rc == 0
assert 'Mattermost' in r.stdout
@retry.retry(AssertionError, tries=5)
def run():
r = host.run("curl -s -m 5 https://chat.$(hostname -d)")
assert r.rc == 0
assert 'Mattermost' in r.stdout
run()
Subproject commit 6097b1621173eb2d002405da83c139032a18f8a6
......@@ -12,7 +12,7 @@ def get_address():
def test_icingaweb2_login_screen(host):
address = get_address()
print ('https://{address}/icingaweb2/authentication/login'.format(address=address))
print('https://{address}/icingaweb2/authentication/login'.format(address=address))
s = requests.Session()
r = s.get('http://{address}/icingaweb2/authentication/login'.format(
address=address,
......
......@@ -10,15 +10,11 @@ platforms:
flavor: "s1-2"
- name: postfix-host
flavor: "s1-2"
- name: postfix-client-host
flavor: "s1-2"
groups:
- firewall_ssh_server_group
provisioner:
name: ansible
options:
i: ../../inventories/common/firewall.yml
limit: bind-host,icinga-host,postfix-host,postfix-client-host,localhost
limit: bind-host,icinga-host,postfix-host,localhost
lint:
name: ansible-lint
env:
......
Subproject commit 30ac5532b12030b42ed0bf3b91d6badad48b2fd7
../../debops/ansible/roles/debops.ansible_plugins
\ No newline at end of file
Subproject commit 1a2f99af1cb2bcf281dbbbda7fe81b35ad3b147d
../../debops/ansible/roles/debops.etc_aliases
\ No newline at end of file
Subproject commit 9527fed2561eb837c71542775be22fb8b3b60f42
../../debops/ansible/roles/debops.opendkim
\ No newline at end of file
Subproject commit d19a4811b709545ea3616b78ce710fb8be2b26a1
../../debops/ansible/roles/debops.postfix
\ No newline at end of file
Subproject commit 26e9ac101874b0dc8db167ba33fe71438121276e
../../debops/ansible/roles/debops.secret
\ No newline at end of file
testinfra_hosts = ['postfix-client-host']
testinfra_hosts = ['icinga-host']
def test_spf(host):
......
......@@ -9,7 +9,7 @@ def test_sendmail(host):
postfix_host = host
postfix_client_host = testinfra.host.Host.get_host(
'ansible://postfix-client-host',
'ansible://icinga-host',
ansible_inventory=host.backend.ansible_inventory)
cmd = postfix_client_host.run("""
......
......@@ -8,6 +8,9 @@ platforms:
flavor: "s1-2"
- name: postfix-host
flavor: "s1-2"
# remove when https://github.com/ansible/molecule/issues/1650 is resolved
groups:
- wazuh_agent
- name: icinga-host
flavor: "s1-2"
- name: wazuh-host
......@@ -23,9 +26,6 @@ platforms:
flavor: "s1-4"
- name: packages-host
flavor: "s1-4"
# remove when https://github.com/ansible/molecule/issues/1650 is resolved
groups:
- wazuh_agent
- name: website-host
flavor: "s1-2"
- name: chat-host
......
......@@ -3,6 +3,7 @@
- import_playbook: ../letsencrypt/letsencrypt-playbook.yml
- import_playbook: ../icinga/test-icinga-playbook.yml
- import_playbook: ../letsencrypt-nginx/letsencrypt-nginx-playbook.yml
- import_playbook: ../wazuh/test-wazuh-playbook.yml
- import_playbook: ../../enough-community-playbook.yml
- name: display domain name
......
../../backup/tests/test_backup.py
\ No newline at end of file
../../cloud/tests/test_nextcloud.py
\ No newline at end of file
../../enough/tests/test_nextcloud.py
\ No newline at end of file
../../postfix/tests/test_postfix.py
\ No newline at end of file
../../wazuh/tests/test_wazuh.py
\ No newline at end of file
../../wereport/tests/test_nextcloud.py
\ No newline at end of file
......@@ -15,7 +15,6 @@ asn1crypto==0.24.0 # via cryptography
atomicwrites==1.2.1 # via pytest
attrs==18.2.0 # via pytest
babel==2.6.0 # via sphinx
backports.functools-lru-cache==1.5 # via arrow
bcrypt==3.1.5 # via paramiko
binaryornot==0.4.4 # via cookiecutter
cerberus==1.2 # via molecule
......@@ -27,25 +26,19 @@ click==6.7 # via click-completion, cookiecutter, molecule, pip-to
cliff==2.14.0
cmd2==0.8.9 # via cliff
colorama==0.3.9 # via molecule, python-gilt
configparser==3.5.0 # via flake8
contextlib2==0.5.5 # via cmd2
cookiecutter==1.6.0 # via molecule
coverage==4.5.2
cryptography==2.4.2 # via ansible, openstacksdk, paramiko
decorator==4.3.0 # via openstacksdk
docutils==0.14 # via sphinx
dogpile.cache==0.6.8 # via openstacksdk
enum34==1.1.6 # via cmd2, cryptography, flake8
fasteners==0.14.1 # via python-gilt
filelock==3.0.10 # via tox
flake8==3.5.0
funcsigs==1.0.2 # via mock, pytest
future==0.17.1 # via cookiecutter
futures==3.2.0 # via openstacksdk
git-url-parse==1.1.0 # via python-gilt
idna==2.8 # via cryptography, requests
imagesize==1.1.0 # via sphinx
ipaddress==1.0.22 # via cryptography, openstacksdk
iso8601==0.1.12 # via keystoneauth1, openstacksdk
jinja2-time==0.2.0 # via cookiecutter
jinja2==2.10
......@@ -55,7 +48,6 @@ jsonpointer==2.0 # via jsonpatch
keystoneauth1==3.11.2 # via openstacksdk
markupsafe==1.1.0 # via jinja2
mccabe==0.6.1 # via flake8
mock==2.0.0 # via pytest-mock
molecule==2.16.0
monotonic==1.5 # via fasteners
more-itertools==5.0.0 # via pytest
......@@ -67,9 +59,8 @@ os-client-config==1.31.2 # via shade
os-service-types==1.4.0 # via keystoneauth1, openstacksdk
packaging==18.0 # via sphinx
paramiko==2.4.2 # via ansible
pathlib2==2.3.3 # via pytest
pathspec==0.5.9 # via yamllint
pbr==4.0.4 # via cliff, git-url-parse, keystoneauth1, mock, molecule, openstacksdk, os-service-types, python-gilt, shade, stevedore
pbr==4.0.4 # via cliff, git-url-parse, keystoneauth1, molecule, openstacksdk, os-service-types, python-gilt, shade, stevedore
pexpect==4.6.0 # via molecule
pip-tools==3.2.0
pluggy==0.8.0 # via pytest, tox
......@@ -94,22 +85,18 @@ pytz==2018.9 # via babel
pyyaml==3.12 # via ansible, ansible-lint, cliff, molecule, openstacksdk, python-gilt, yamllint
requests==2.21.0
requestsexceptions==1.4.0 # via openstacksdk
scandir==1.9.0 # via pathlib2
sh==1.12.14
shade==1.30.0
six==1.11.0 # via ansible-lint, bcrypt, click-completion, cliff, cmd2, cryptography, fasteners, keystoneauth1, mock, molecule, more-itertools, munch, openstacksdk, packaging, pathlib2, pip-tools, pynacl, pytest, python-dateutil, sphinx, stevedore, testinfra, tox
six==1.11.0 # via ansible-lint, bcrypt, click-completion, cliff, cmd2, cryptography, fasteners, keystoneauth1, molecule, more-itertools, munch, openstacksdk, packaging, pip-tools, pynacl, pytest, python-dateutil, sphinx, stevedore, testinfra, tox
snowballstemmer==1.2.1 # via sphinx
sphinx==1.8.3
sphinxcontrib-websupport==1.1.0 # via sphinx
stevedore==1.30.0 # via cliff, keystoneauth1
subprocess32==3.5.3 # via cmd2
tabulate==0.8.2 # via molecule
testinfra==1.14.0
toml==0.10.0 # via tox
tox==3.6.1
tree-format==0.1.2 # via molecule
typing==3.6.6 # via sphinx
unicodecsv==0.14.1 # via cliff
urllib3==1.24.1 # via requests
virtualenv==16.2.0 # via tox
wcwidth==0.1.7 # via cmd2
......
......@@ -22,20 +22,15 @@ click==6.7 # via click-completion, cookiecutter, git-url-parse, m
cliff==2.14.0
cmd2==0.8.9 # via cliff
colorama==0.3.9 # via molecule, python-gilt
configparser==3.5.0 # via flake8
contextlib2==0.5.5 # via cmd2
cookiecutter==1.6.0 # via molecule
cryptography==2.4.2 # via ansible, openstacksdk, paramiko
decorator==4.1.2 # via openstacksdk
dogpile.cache==0.6.4 # via openstacksdk
enum34==1.1.6 # via cmd2, cryptography, flake8
fasteners==0.14.1 # via python-gilt
flake8==3.5.0 # via molecule
future==0.16.0 # via cookiecutter
futures==3.1.1 # via openstacksdk
git-url-parse==1.0.1 # via python-gilt
idna==2.6 # via cryptography, requests
ipaddress==1.0.18 # via cryptography, openstacksdk
iso8601==0.1.12 # via keystoneauth1, openstacksdk
jinja2-time==0.2.0 # via cookiecutter
jinja2==2.10
......@@ -79,11 +74,9 @@ sh==1.12.14
shade==1.30.0
six==1.11.0 # via ansible-lint, bcrypt, click-completion, cliff, cmd2, cryptography, fasteners, git-url-parse, keystoneauth1, molecule, munch, openstacksdk, pynacl, python-dateutil, stevedore, testinfra
stevedore==1.26.0 # via cliff, keystoneauth1
subprocess32==3.5.3 # via cmd2
tabulate==0.8.2 # via molecule
testinfra==1.14.0 # via molecule
tree-format==0.1.2 # via molecule
unicodecsv==0.14.1 # via cliff
urllib3==1.22 # via requests
wcwidth==0.1.7 # via cmd2
whichcraft==0.4.1 # via cookiecutter
......
[metadata]
name = enough
author = Enough Community
version = 1.0.0
version = 1.0.1
release =
author-email = contact@enough.community
summary = Helping journalists and human rights defefenders to communicate securely and privately
......
[tox]
minversion = 2.0
envlist = py27,pep8,docs
envlist = py3,pep8,docs
[testenv]
setenv = VIRTUAL_ENV={envdir}
......@@ -18,6 +17,6 @@ commands = flake8 {posargs}
commands = sphinx-build -W -vvv -b html docs build/html
[flake8]
exclude = venv,.tox,dist,doc,*.egg,build,docs/conf.py,src
exclude = venv,.tox,dist,doc,*.egg,build,docs/conf.py,src,molecule/postfix/roles/debops*
show-source = true
max_line_length = 100