GithubHelp home page GithubHelp logo

sympa-ansible's People

Contributors

dverdin avatar ldidry avatar osalaun avatar racke avatar salaun-urennes1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sympa-ansible's Issues

Invalid argument for password in "Add user accounts" task

TASK [common : Add user accounts] *************************************************************************************************************************************************
ok: [local-sympa] => (item={'name': 'david', 'password': False, 'group': 'sympa'})
ok: [local-sympa] => (item={'name': 'olivier', 'password': False, 'group': 'sympa'})
 [WARNING]: The input password appears not to have been hashed. The 'password' argument must be encrypted for this module to work properly.

Upgrade Sympa task fails (MySQL connection problem)

TASK [sympa : Upgrade Sympa] ***********************************************************************************************************************************
fatal: [local-sympa-ubuntu16]: FAILED! => {"changed": true, "cmd": "/usr/local/sympa/bin/sympa.pl --upgrade", "delta": "0:00:00.586450", "end": "2017-12-13 12:02:04.872614", "failed": true, "msg": "non-zero return code", "rc": 255, "start": "2017-12-13 12:02:04.286164", "stderr": "err main::#251 > main::_load#981 > Sympa::DatabaseManager::instance#54 > Sympa::DatabaseDriver::MySQL::connect#53 > Sympa::Database::connect#158 Can't connect to Database Sympa::DatabaseDriver::MySQL <db_host=localhost;db_name=sympa;db_user=sympa_user>: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)\nDatabase sympa defined in sympa.conf is unreachable. verify db_xxx parameters in sympa.conf", "stderr_lines": ["err main::#251 > main::_load#981 > Sympa::DatabaseManager::instance#54 > Sympa::DatabaseDriver::MySQL::connect#53 > Sympa::Database::connect#158 Can't connect to Database Sympa::DatabaseDriver::MySQL <db_host=localhost;db_name=sympa;db_user=sympa_user>: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)", "Database sympa defined in sympa.conf is unreachable. verify db_xxx parameters in sympa.conf"], "stdout": "", "stdout_lines": []}

Add script to setup environment

Proof of concept below:


CWD=`pwd`
SCRIPT_DIR=`dirname $0`
ANSIBLE_DIR="$SCRIPT_DIR/.."
INVENTORY_DIR="environments/local"
INVENTORY_PATH="$ANSIBLE_DIR/$INVENTORY_DIR"
echo $ANSIBLE_DIR
echo $INVENTORY_PATH

# check whether inventory exists
if [ -d "$INVENTORY_PATH" ]; then
    echo "Inventory directory $INVENTORY_DIR exists already, terminating."
    exit 1
fi

$SCRIPT_DIR/create_new_environment.sh $INVENTORY_PATH

# setup inventory file
ln -s ../../.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory $INVENTORY_PATH/inventory

Documentation of custom plugins

Please document the custom plugins in the filter_plugins and action_plugins directories. It is not obvious where these filters come from when looking at the task files.

Fix broken Travis due to changes in Ansible ("No module named json")

For a possible solution see: ansible/ansible#61621

TASK [Create secrets] **********************************************************

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ImportError: No module named json

fatal: [localhost -> 127.0.0.1]: FAILED! => changed=false 

  module_stderr: |-

    Traceback (most recent call last):

      File "/home/travis/.ansible/tmp/ansible-tmp-1574069964.2-143565745060280/AnsiballZ_vault_random.py", line 102, in <module>

        _ansiballz_main()

      File "/home/travis/.ansible/tmp/ansible-tmp-1574069964.2-143565745060280/AnsiballZ_vault_random.py", line 94, in _ansiballz_main

        invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)

      File "/home/travis/.ansible/tmp/ansible-tmp-1574069964.2-143565745060280/AnsiballZ_vault_random.py", line 40, in invoke_module

        runpy.run_module(mod_name='ansible.modules.vault_random', init_globals=None, run_name='__main__', alter_sys=True)

      File "/usr/lib/python2.7/runpy.py", line 188, in run_module

        fname, loader, pkg_name)

      File "/usr/lib/python2.7/runpy.py", line 82, in _run_module_code

        mod_name, mod_fname, mod_loader, pkg_name)

      File "/usr/lib/python2.7/runpy.py", line 72, in _run_code

        exec code in run_globals

      File "/tmp/ansible_vault_random_payload_EBOVLE/ansible_vault_random_payload.zip/ansible/modules/vault_random.py", line 14, in <module>

      File "/usr/lib/python2.7/dist-packages/ansible/cli/__init__.py", line 22, in <module>

        from ansible.inventory.manager import InventoryManager

      File "/usr/lib/python2.7/dist-packages/ansible/inventory/manager.py", line 38, in <module>

        from ansible.plugins.loader import inventory_loader

      File "/usr/lib/python2.7/dist-packages/ansible/plugins/loader.py", line 22, in <module>

        from ansible.parsing.utils.yaml import from_yaml

      File "/usr/lib/python2.7/dist-packages/ansible/parsing/utils/yaml.py", line 19, in <module>

        from ansible.parsing.ajson import AnsibleJSONDecoder

      File "/usr/lib/python2.7/dist-packages/ansible/parsing/ajson.py", line 11, in <module>

        from ansible.module_utils.common.json import AnsibleJSONEncoder

    ImportError: No module named json

  module_stdout: ''

  msg: |-

    MODULE FAILURE

    See stdout/stderr for the exact error

  rc: 1

Describe setup in README.md

There is a large section about "Ansible Tools" in the README which addresses more advance users but nothing at all about the other servers (web/database/email).

Switch to Python3

[DEPRECATION WARNING]: Distribution Ubuntu 16.04 on host local-sympa should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior
Ansible releases. A future Ansible release will default to using the discovered platform python for this host. See
https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information. This feature will be removed in version 2.12. Deprecation
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

Sympa virtual robots crash

This happens when you run the playbook as instructed.

TASK [sympa : include_vars] ***************************************************************************************************************************************
fatal: [local-sympa-ubuntu16]: FAILED! => {"ansible_facts": {"robots": {}}, "ansible_included_var_files": [], "changed": false, "message": "/home/racke/sympa-community/ansible/environments/local/sympa_virtual_robots directory does not exist"}

Broken SSL key

No idea how that happened. @dverdin where is the vault filter documented?

b'-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDTNOr78A4OLU51\nJZgep+AcSphIw80NqXUTKmncUCP4Vexkzds1OBvpDiDX43KfXidPxV1m4FmiatP7\nBepulwiNYS6P0Do9ZaCV+oYwfDUSCiKcyJxfnwUXJKOCGP2iAPpp4E/qd+h8EtN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1VI1xqrpioIQCPFchPwpP/wKBgEXP\nrrQylaPk7bONdmxqhPXxk21bGD2FWFcqATqnVa4ed9mbjF31v4ACFE6ocDozbusx\nxxMy/zs3UTh+PBOEBDBUx/KDs5/sWw2ldPR/6c2jJmAJxxsuS+OX0xDlwzjs4WbW\nX16Q6va4PRYYar2No/hfOvjUYraHvSTBft/FlB5lAoGBAKq9wS5fzhPbuKtDlvNc\n+9F8FggpH7FPTVOVIeMKNa/UhdBR22XB0XQYc/e6wGhE7EpThXe73bg3lRCGDI5Q\nV85co4XgClR1X3moGc5abxpgFwAfju7+gbxhuegqErQXvctubNCdkPPhRgbdESNZ\nprJ1WMeWkm5hFDG8r9k/+++y\n-----END PRIVATE KEY-----\n

Make SOAP server optional

I suppose that most Sympa instances don't use the SOAP server, thus I would like to make the SOAP server optional through a variable.

Break out roles

Currently we have basically a big Sympa role that installs database, postfix, apache and sympa. Each one of these should become its own role. Also they should be executed in a more logical order:

  1. database
  2. sympa
  3. postfix
  4. apache

That would allow more flexibility as well, e.g. leaving out roles or replace with a different server (nginx, exim).

Sympa upgrades are not supported

Nov 8 16:31:42 local-sympa-ubuntu16 wwsympa[15808]: err main::#997 > Conf::data_structure_uptodate#741 Data structure (6.2.16) is not uptodate for current release (6.2.22)
Nov 8 16:31:42 local-sympa-ubuntu16 wwsympa[15808]: err main::#999 WWSympa set to maintenance mode; you should run sympa.pl --upgrade

Fails with Sympa 6.1.17

configure: WARNING: unrecognized options: --with-unitsdir\nconfigure: WARNING: unrecognized options: --with-unitsdir\nqueue.c: In function 'main':\nqueue.c:119:8: warning: implicit declaration of function 'chdir' [-Wimplicit-function-declaration]\n    if (chdir(queuedir) == -1) {\n        ^\nqueue.c:125:4: warning: implicit declaration of function 'umask' [-Wimplicit-function-declaration]\n    umask(027);\n    ^\nqueue.c:126:60: warning: implicit declaration of function 'time' [-Wimplicit-function-declaration]\n    snprintf(qfile, sizeof(qfile), \"T.%s.%ld.%d\", listname, time(NULL), getpid());\n                                                            ^\nqueue.c:126:72: warning: implicit declaration of function 'getpid' [-Wimplicit-function-declaration]\n    snprintf(qfile, sizeof(qfile), \"T.%s.%ld.%d\", listname, time(NULL), getpid());\n                                                                        ^\nqueue.c:126:35: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'int' [-Wformat=]\n    snprintf(qfile, sizeof(qfile), \"T.%s.%ld.%d\", listname, time(NULL), getpid());\n                                   ^\nqueue.c:126:35: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'int' [-Wformat=]\nqueue.c:134:4: warning: implicit declaration of function 'write' [-Wimplicit-function-declaration]\n    write(fd, \"X-Sympa-To: \", 12);\n    ^\nqueue.c:145:16: warning: implicit declaration of function 'read' [-Wimplicit-function-declaration]\n    while ((i = read(fileno(stdin), buf, sizeof buf)) > 0)\n                ^\nqueue.c:146:4: warning: implicit declaration of function 'close' [-Wimplicit-function-declaration]\n    close(fd);\n    ^\nqueue.c:148:4: warning: implicit declaration of function 'sleep' [-Wimplicit-function-declaration]\n    sleep(1);\n    ^\nbouncequeue.c: In function 'main':\nbouncequeue.c:103:8: warning: implicit declaration of function 'chdir' [-Wimplicit-function-declaration]\n    if (chdir(bouncedir) == -1) {\n        ^\nbouncequeue.c:106:4: warning: implicit declaration of function 'umask' [-Wimplicit-function-declaration]\n    umask(027);\n    ^\nbouncequeue.c:107:60: warning: implicit declaration of function 'time' [-Wimplicit-function-declaration]\n    snprintf(qfile, sizeof(qfile), \"T.%s.%ld.%d\", listname, time(NULL), getpid());\n                                                            ^\nbouncequeue.c:107:72: warning: implicit declaration of function 'getpid' [-Wimplicit-function-declaration]\n    snprintf(qfile, sizeof(qfile), \"T.%s.%ld.%d\", listname, time(NULL), getpid());\n                                                                        ^\nbouncequeue.c:107:35: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'int' [-Wformat=]\n    snprintf(qfile, sizeof(qfile), \"T.%s.%ld.%d\", listname, time(NULL), getpid());\n                                   ^\nbouncequeue.c:107:35: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'int' [-Wformat=]\nbouncequeue.c:111:4: warning: implicit declaration of function 'write' [-Wimplicit-function-declaration]\n    write(fd, \"X-Sympa-To: \", 12);\n    ^\nbouncequeue.c:122:16: warning: implicit declaration of function 'read' [-Wimplicit-function-declaration]\n    while ((i = read(fileno(stdin), buf, sizeof buf)) > 0)\n                ^\nbouncequeue.c:123:4: warning: implicit declaration of function 'close' [-Wimplicit-function-declaration]\n    close(fd);\n    ^\nbouncequeue.c:125:4: warning: implicit declaration of function 'sleep' [-Wimplicit-function-declaration]\n    sleep(1);\n    ^\nfamilyqueue.c: In function 'main':\nfamilyqueue.c:114:8: warning: implicit declaration of function 'chdir' [-Wimplicit-function-declaration]\n    if (chdir(queuedir) == -1) {\n        ^\nfamilyqueue.c:120:4: warning: implicit declaration of function 'umask' [-Wimplicit-function-declaration]\n    umask(027);\n    ^\nfamilyqueue.c:121:60: warning: implicit declaration of function 'time' [-Wimplicit-function-declaration]\n    snprintf(qfile, sizeof(qfile), \"T.%s.%ld.%d\", listname, time(NULL), getpid());\n                                                            ^\nfamilyqueue.c:121:72: warning: implicit declaration of function 'getpid' [-Wimplicit-function-declaration]\n    snprintf(qfile, sizeof(qfile), \"T.%s.%ld.%d\", listname, time(NULL), getpid());\n                                                                        ^\nfamilyqueue.c:121:35: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'int' [-Wformat=]\n    snprintf(qfile, sizeof(qfile), \"T.%s.%ld.%d\", listname, time(NULL), getpid());\n                                   ^\nfamilyqueue.c:121:35: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'int' [-Wformat=]\nfamilyqueue.c:129:4: warning: implicit declaration of function 'write' [-Wimplicit-function-declaration]\n    write(fd, \"X-Sympa-Family: \", 16);\n    ^\nfamilyqueue.c:144:16: warning: implicit declaration of function 'read' [-Wimplicit-function-declaration]\n    while ((i = read(fileno(stdin), buf, sizeof buf)) > 0)\n                ^\nfamilyqueue.c:145:4: warning: implicit declaration of function 'close' [-Wimplicit-function-declaration]\n    close(fd);\n    ^\nfamilyqueue.c:147:4: warning: implicit declaration of function 'sleep' [-Wimplicit-function-declaration]\n    sleep(1);\n    ^\naliaswrapper.c: In function 'main':\naliaswrapper.c:38:2: warning: ignoring return value of 'setuid', declared with attribute warn_unused_result [-Wunused-result]\n  setuid(0);\n  ^\nvirtualwrapper.c: In function 'main':\nvirtualwrapper.c:37:2: warning: ignoring return value of 'setuid', declared with attribute warn_unused_result [-Wunused-result]\n  setuid(0);\n  ^\nwwsympa-wrapper.fcgi.c: In function 'main':\nwwsympa-wrapper.fcgi.c:4:5: warning: ignoring return value of 'setreuid', declared with attribute warn_unused_result [-Wunused-result]\n     setreuid(geteuid(),geteuid()); // Added to fix the segfault\n     ^\nwwsympa-wrapper.fcgi.c:5:5: warning: ignoring return value of 'setregid', declared with attribute warn_unused_result [-Wunused-result]\n     setregid(getegid(),getegid()); // Added to fix the segfault\n     ^\nsympa_soap_server-wrapper.fcgi.c: In function 'main':\nsympa_soap_server-wrapper.fcgi.c:4:5: warning: ignoring return value of 'setreuid', declared with attribute warn_unused_result [-Wunused-result]\n     setreuid(geteuid(),geteuid());\n     ^\nsympa_soap_server-wrapper.fcgi.c:5:5: warning: ignoring return value of 'setregid', declared with attribute warn_unused_result [-Wunused-result]\n     setregid(getegid(),getegid());\n     ^\narchived.pod around line 61: Non-ASCII character seen before =encoding in 'Comité'. Assuming ISO8859-1\nPOD document had syntax errors at /usr/bin/pod2man line 68.\nmake[2]: *** [archived.8] Error 255\nmake[1]: *** [all-recursive] Error 1\nmake: *** [all-recursive] Error 1", "stderr_lines": ["configure: WARNING: unrecognized options: --with-unitsdir", "configure: WARNING: unrecognized options: --with-unitsdir", "queue.c: In function 'main':", "queue.c:119:8: warning: implicit declaration of function 'chdir' [-Wimplicit-function-declaration]", "    if (chdir(queuedir) == -1) {", "        ^", "queue.c:125:4: warning: implicit declaration of function 'umask' [-Wimplicit-function-declaration]", "    umask(027);", "    ^", "queue.c:126:60: warning: implicit declaration of function 'time' [-Wimplicit-function-declaration]", "    snprintf(qfile, sizeof(qfile), \"T.%s.%ld.%d\", listname, time(NULL), getpid());", "                                                            ^", "queue.c:126:72: warning: implicit declaration of function 'getpid' [-Wimplicit-function-declaration]", "    snprintf(qfile, sizeof(qfile), \"T.%s.%ld.%d\", listname, time(NULL), getpid());", "                                                                        ^", "queue.c:126:35: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'int' [-Wformat=]", "    snprintf(qfile, sizeof(qfile), \"T.%s.%ld.%d\", listname, time(NULL), getpid());", "                                   ^", "queue.c:126:35: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'int' [-Wformat=]", "queue.c:134:4: warning: implicit declaration of function 'write' [-Wimplicit-function-declaration]", "    write(fd, \"X-Sympa-To: \", 12);", "    ^", "queue.c:145:16: warning: implicit declaration of function 'read' [-Wimplicit-function-declaration]", "    while ((i = read(fileno(stdin), buf, sizeof buf)) > 0)", "                ^", "queue.c:146:4: warning: implicit declaration of function 'close' [-Wimplicit-function-declaration]", "    close(fd);", "    ^", "queue.c:148:4: warning: implicit declaration of function 'sleep' [-Wimplicit-function-declaration]", "    sleep(1);", "    ^", "bouncequeue.c: In function 'main':", "bouncequeue.c:103:8: warning: implicit declaration of function 'chdir' [-Wimplicit-function-declaration]", "    if (chdir(bouncedir) == -1) {", "        ^", "bouncequeue.c:106:4: warning: implicit declaration of function 'umask' [-Wimplicit-function-declaration]", "    umask(027);", "    ^", "bouncequeue.c:107:60: warning: implicit declaration of function 'time' [-Wimplicit-function-declaration]", "    snprintf(qfile, sizeof(qfile), \"T.%s.%ld.%d\", listname, time(NULL), getpid());"

Sub-addressing with Postfix does not work

Hi,

Ansible installs /etc/mail/sympa_aliases including : bounce+*: "| /usr/local/sympa/bin/bouncequeue [email protected]". On my local server delivery to bounce+* fails with the following error :

May 27 21:07:06 localhost postfix/local[6077]: 0424BA23A6: to=<[email protected]>, relay=local, delay=1.9, delays=1.9/0.01/0/0, dsn=5.1.1, status=bounced (unknown user: "bounce")

I tried applying the recommended change on /etc/postfix/master.cf from http://cweiske.de/tagebuch/postfix-plus-addressing.htm but still mails to bounce+* are rejected.

Any clue to fix that?

Split sympa-ansible in multiple repositories

Shouldn't there be more repositories that install a sympa server? And not the complete ansible inventory?
I was wondering if there would be the possibility to split this repository into multiple repositories to allow further development and reusage for small parts.
I would be interested to extend the sympa role, but not with apache and since we use our own common role, I would think I would be a great help putting the sympa role into its own repository and listing the dependencies or the requirements for this role to work.
What do you guys think?

Switch to cryptography

[DEPRECATION WARNING]: The module is using the PyOpenSSL backend. This backend has been deprecated. This feature will be removed in version 2.13. Deprecation
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.