Skip to Content.
Sympa Menu

devel - Re: [sympa-developpers] How to test Sympa ?

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: "Stefan Hornburg (Racke)" <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-developpers] How to test Sympa ?
  • Date: Thu, 19 Oct 2017 16:43:52 +0200

On 10/19/2017 03:24 PM, David Verdin wrote:
> OK
>
> So I fixed a few issues and now the server is deploying well.
>
> Everything seems to be in order. Only problem is that running the playbook
> can be done with the following command only:
>
> ansible-playbook site.yml -i environments/local
>
> Regards,
>
> David

For me, it cracked at:

TASK [apache : Vhosts to be installed]
*******************************************************************************************************************
[WARNING]: Unable to find
'/home/racke/sympa-community/sympa-ansible/environments/local/inventory/ssl_cert/webserver.key'
in expected paths.

fatal: [local-sympa-ubuntu16]: FAILED! => {"msg": "[{u'ssl_key': u'{{
sympa_ssl_key }}', u'name': u'{{
sympa_web_hostname }}', u'ssl_certificate': u'{{ sympa_ssl_certificate }}',
u'ip': u'*', u'ssl': True, u'config': u\"{{
lookup('template',
role_path+'/../sympa/templates/apache/sympa_vhost443.conf.j2') }}\", u'port':
443}, {u'ip': u'*',
u'config': u\"{{ lookup('template',
role_path+'/../sympa/templates/apache/sympa_vhost80.conf.j2') }}\", u'port':
80,
u'ssl': False, u'name': u'{{ sympa_web_hostname }}'}]: {{
lookup('file',inventory_dir+'/ssl_cert/webserver.key') }}: An
unhandled exception occurred while running the lookup plugin 'file'. Error
was a <class 'ansible.errors.AnsibleError'>,
original message: could not locate file in lookup:
/home/racke/sympa-community/sympa-ansible/environments/local/inventory/ssl_cert/webserver.key"}
to retry, use: --limit
@/home/racke/sympa-community/sympa-ansible/site.retry

Note: I'm skipping the common role.

Regards
Racke

>
>
> On 19/10/2017 09:26, David Verdin wrote:
>> Yep, I had the same problem and it looks like it's related to ansible 2.4
>> handling of inventory.
>>
>> See https://docs.ansible.com/ansible/2.4/porting_guide_2.4.html#inventory
>> for more info.
>>
>> Weirdly enough, if I replace:
>>
>> ansible-playbook site.yml -i environments/local/inventory
>>
>> with:
>>
>> ansible-playbook site.yml -i environments/local
>>
>> The playbook works, though it issues a lot of warnings at the beginning.
>>
>>
>> On 18/10/2017 18:38, Stefan Hornburg (Racke) wrote:
>>> On 10/18/2017 09:59 AM, David Verdin wrote:
>>>> Take care. It's more or less broken for now. for some reasons, the
>>>> site.yml does not seem to find the host_vars and
>>>> groups_vars variables.
>>>>
>>>> Maybe my ansible version, maybe something else.
>>>>
>>>> I'm on it.
>>>>
>>> I get the following (Ansible 2.4):
>>>
>>> racke@belukha:~/sympa-community/sympa-ansible$ ansible-playbook site.yml
>>> -i environments/local/inventory
>>> [DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user
>>> and make sure become_method is 'sudo'
>>> (default). This feature will be removed in
>>> version 2.6. Deprecation warnings can be disabled by setting
>>> deprecation_warnings=False in ansible.cfg.
>>> [DEPRECATION WARNING]: The use of 'include' for tasks has been
>>> deprecated. Use 'import_tasks' for static inclusions or
>>> 'include_tasks' for dynamic inclusions.
>>> This feature will be removed in a future release. Deprecation warnings
>>> can be disabled by setting
>>> deprecation_warnings=False in ansible.cfg.
>>> [DEPRECATION WARNING]: include is kept for backwards compatibility but
>>> usage is discouraged. The module documentation
>>> details page may explain more about this
>>> rationale.. This feature will be removed in a future release. Deprecation
>>> warnings can be disabled by setting
>>> deprecation_warnings=False in ansible.cfg.
>>>
>>> PLAY [Check Ansible version]
>>> ***********************************************************************************************************************************
>>>
>>>
>>> TASK [Gathering Facts]
>>> *****************************************************************************************************************************************
>>>
>>> fatal: [local-sympa-ubuntu16]: FAILED! => {"failed": true, "msg": "The
>>> field 'remote_user' has an invalid value, which
>>> includes an undefined variable. The error was: 'ansible_remote_user' is
>>> undefined\nexception type: <class
>>> 'ansible.errors.AnsibleUndefinedVariable'>\nexception:
>>> 'ansible_remote_user' is undefined"}
>>>     to retry, use: --limit
>>> @/home/racke/sympa-community/sympa-ansible/site.retry
>>>
>>> PLAY RECAP
>>> *****************************************************************************************************************************************************
>>>
>>> local-sympa-ubuntu16       : ok=0    changed=0 unreachable=0    failed=1
>>>
>>> It doesn't look like the other roles I used from Ansible Galaxy and from
>>> my current job, so it will take me a while to
>>> catch the logic of the structure.
>>>
>>> Regards
>>>          Racke
>>>
>>>> On 17/10/2017 18:27, Stefan Hornburg (Racke) wrote:
>>>>> On 10/17/2017 09:30 AM, David Verdin wrote:
>>>>>> Interesting. I planned to work on it precisely today.
>>>>>>
>>>>>> Eiro and I worked together the whole last week on Sympa planning on
>>>>>> the RENATER side. I'm now back on my current
>>>>>> works.
>>>>>>
>>>>>> I'll keep you updated soon.
>>>>>>
>>>>>> Cheers,
>>>>>>
>>>>>> David
>>>>> Thanks - I will try it out :-)
>>>>>
>>>>> Regards
>>>>>            Racke
>>>>>
>>>>>> On 16/10/2017 16:51, Stefan Hornburg (Racke) wrote:
>>>>>>> On 10/04/2017 05:00 PM, David Verdin wrote:
>>>>>>>> Hi Racke,
>>>>>>>>
>>>>>>>> Cool! I'll try to speed up move to the public git.
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>>
>>>>>>>> David
>>>>>>> Hello,
>>>>>>>
>>>>>>> any update - got an user asking for an ansible setup ...
>>>>>>>
>>>>>>> Regards
>>>>>>>               Racke
>>>>>>>
>>>>>>>> On 04/10/2017 16:37, Stefan Hornburg (Racke) wrote:
>>>>>>>>> On 10/04/2017 01:49 PM, David Verdin wrote:
>>>>>>>>>> Hi guys,
>>>>>>>>>>
>>>>>>>>>> Well, not yet, but a friend and I are working on a vagrant+ansible
>>>>>>>>>> build of a development environment.
>>>>>>>>>>
>>>>>>>>>> The idea is to have a sympa server and a webmail server tuned to
>>>>>>>>>> communicate with each other only, so that it is
>>>>>>>>>> easy to
>>>>>>>>>> send mail tot test stuff.
>>>>>>>>>>
>>>>>>>>>> But, again, work in progress. For now, we have a working Sympa
>>>>>>>>>> with virtual hosts.
>>>>>>>>>>
>>>>>>>>>> This is NOT a RENATER project. Well, not yet at least. Hence the
>>>>>>>>>> slow development rate.
>>>>>>>>>>
>>>>>>>>>> As soon as we have a public git, I'll let it know to the list, so
>>>>>>>>>> that you can use it.
>>>>>>>>> Hello David,
>>>>>>>>>
>>>>>>>>> please do this soon than later. I do a lot of stuff with
>>>>>>>>> vagrant+ansible lately (mcrouter, memcached, selenium,
>>>>>>>>> docker,
>>>>>>>>> dnsmasq recently, so I'm sure I can help with that project.
>>>>>>>>>
>>>>>>>>> Sounds definitely interesting.
>>>>>>>>>
>>>>>>>>> Regards
>>>>>>>>>             Racke
>>>>>>>>>
>>>>>>>>>> Cheers,
>>>>>>>>>>
>>>>>>>>>> David
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 04/10/2017 11:57, Luc Didry (via sympa-developpers Mailing
>>>>>>>>>> List) wrote:
>>>>>>>>>>> Hello,
>>>>>>>>>>>
>>>>>>>>>>> Is there a way to test Sympa without mounting a whole server? A
>>>>>>>>>>> vagrant build, a
>>>>>>>>>>> docker image…?
>>>>>>>>>>>
>>>>>>>>>>> I'm developping a patch to correct email addresses with a setting
>>>>>>>>>>> in sympa.conf
>>>>>>>>>>> (you provide regexp and replacement: { '@gmail\.fr$' =>
>>>>>>>>>>> '@gmail.com }) and want
>>>>>>>>>>> to test it, but without installing the whole thing if possible.
>>>>>>>>>>>
>>>>>>>>>>> Also: what is the best branch to work on? master? sympa-6.2? The
>>>>>>>>>>> latest tag?
>>>>>>>>>>>
>>>>>>>>>>> Regards,
>>>
>>
>


--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration.



Archive powered by MHonArc 2.6.19+.

Top of Page