Giter VIP home page Giter VIP logo

ansible's Introduction

geOrchestra

Codacy Badge

geOrchestra is a complete Spatial Data Infrastructure solution.

It features a metadata catalog (GeoNetwork), an OGC server (GeoServer) with fine-grained access control (based on GeoFence), an advanced viewer and editor and many more (security and auth system based on proxy/CAS/LDAP, analytics, admin UIs, ...)

Please refer to the documentation for more information.

ansible's People

Contributors

fvanderbiest avatar gaetanbrl avatar jeanmi151 avatar jphuart avatar landryb avatar maxireglisse avatar pierrejego avatar pmauduit avatar

Stargazers

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

Watchers

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

ansible's Issues

apache2_module is not a legal parameter in an Ansible task or handler

With the following vagrantfile:

VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "wheezy"
  config.vm.box_url = "https://github.com/jose-lpa/packer-debian_7.6.0/releases/download/1.0/packer_virtualbox-iso_virtualbox.box"
  config.vm.network :public_network
  config.vm.provision :ansible do |ansible|
    ansible.playbook = "playbooks/georchestra.yml"
  end
end

... I'm getting during provisioning:

[default] Running provisioner: ansible...
ERROR: apache2_module is not a legal parameter in an Ansible task or handler
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

I'm using ansible 1.5.4

Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user

TASK [postgresql : create georchestra user] ************************************
fatal: [mygeorchestra]: FAILED! => {"msg": "Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user (rc: 1, err: chown: changing ownership of '/var/tmp/ansible-tmp-1530692109.47-98572059002815/': Operation not permitted\nchown: changing ownership of '/var/tmp/ansible-tmp-1530692109.47-98572059002815/postgresql_user.py': Operation not permitted\n}). For information on working around this, see https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user"}

force-disable recaptcha check fails

TASK [georchestra : force-disable recaptcha check] *****************************
fatal: [mygeorchestra]: FAILED! => {"changed": false, "msg": "Path /srv/tomcat/georchestra/webapps/console/WEB-INF/views/validation.jsp does not exist !", "rc": 257}

unarchive fails on ubuntu, but succeeds on centos, with a zip file and remote_src

to reproduce:
target must be centos, ansible runs from ubuntu
place a .zip file on the target
verify unzip is installed on the target
call unarchive with remote_src: yes

will get failure:
fatal: [c6-bl-2]: FAILED! => {"changed": false, "failed": true, "msg": "Failed to find handler for "/tmp/ansible-tmp-1490881579.04-112291742753076/source". Make sure the required command
installed."}

[services] geoserver/web

Bonjour,

J'ai déployé georchestra via ansible.
J'ai un souci dans l'interface GeoServer (https://xxxxxx/geoserver/web/).
Lorsque je navigue dans les onglets ou en cliquant sur les boutons, j'obtiens une erreur 400.

État HTTP 400 – Requête invalide
Type Rapport d'état
message Origin does not correspond to request
description La requête envoyée par le client était syntaxiquement incorrecte.
Apache Tomcat/9.0.31 (Debian)

A chaque fois c'est une url du style xxxxxxPage?48-1.ILinkListener-charts-tabs~container-tabs-2-link qui est générée et cause l'erreur.

Auriez-vous une piste pour cerner le pb ?
Merci

Georges.

Sudo error

Hi All,

I’m getting below error while sudo’ing to mqadmin id while logging into remote linux machine..
While running the on Redhat server I get this below error
"module_stdout": "\r\nSorry, user mqadmin is not allowed to execute '/bin/sh -c echo BECOME-SUCCESS-frnjqhjiraruzyzodxgpwceqylxjkvbi; /usr/bin/python /var/tmp/ansible-tmp-1531448966.94-199117643620200/setup.py' as mqm on server1.\r\n",
"msg": "MODULE FAILURE",
"rc": 1

TASK [Gathering Facts] *******************************************************************************************************************************
fatal: [server1]: FAILED! => {"changed": false, "module_stderr": "Shared connection to servers1 closed.\r\n", "module_stdout": "\r\nSorry, user mqadmin is not allowed to execute '/bin/bash -c echo BECOME-SUCCESS-ylpnxkqhbsjmcvmbjwhecfwolywoucsv; /usr/bin/python /var/tmp/ansible-tmp-1531457721.05-98554963015284/setup.py' as mqm on server1.\r\n", "msg": "MODULE FAILURE", "rc": 1}
to retry, use: --limit @/etc/ansible/mq/mqver.retry

Pls help me to resolve this.

Thanks
Chinna

[runtime_exception] Failed to compile stylesheet

Hello friends,

I deployed georchestra via last ansible scripts. The deployment is correctly carried out :)

However I have a problem when I use catalog.edit, I get this error:
runtime_exception Failed to compile stylesheet. 8 errors detected.TransformerConfigurationException

image

Could you help me please ?
Thank you in advance for your help.

Mak '

Géorchestra Catalogue (geonetwork) - erreur 404

Bonjour,

J'ai installé sur une debian 9 "vierge" georchestra avec ansible, apres quelques petits reglages, l'installation s'est effectuée sans encombre, je peux me connecter et voir toutes les pages, sauf Catalogue (geonetwork) qui m'affiche le "header" avec Erreur 404 - Ressource introuvable.
Je n'ai pas fait qu'un seul essai, j'ai a chaque fois le même résultat.
La seule modif faite dans le fichier yml est le nom fqdn de la machine.

Cordialement,
Marc Fleck
Unistra - Geographie

postgresql | create georchestra user => Missing sudo password

TASK: [postgresql | create georchestra user] ********************************** 
fatal: [default] => Missing sudo password

FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/home/fvanderbiest/georchestra.retry

default                    : ok=13   changed=12   unreachable=1    failed=0   

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

checkout geonetwork datadir fails

TASK: [georchestra | checkout geonetwork datadir] *****************************
failed: [mygeorchestra] => {"cmd": "/usr/bin/git clone --origin origin --recursive --branch master https://github.com/georchestra/geonetwork_minimal_datadir /srv/data/geonetwork", "failed": true, "rc": 128}
stderr: fatal: destination path '/srv/data/geonetwork' already exists and is not an empty directory.

msg: fatal: destination path '/srv/data/geonetwork' already exists and is not an empty directory.

FATAL: all hosts have already failed -- aborting

[DEPRECATION WARNING]: [defaults]hostfile option / use [defaults] inventory=/path/to/file|dir instead

georchestra: Running ansible-playbook...

PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o IdentityFile=/home/fvanderbiest/.vagrant.d/insecure_private_key -o ControlMaster=auto -o ControlPersist=60s' ansible-playbook --connection=ssh --timeout=30 --extra-vars=ansible_user='vagrant' --limit="mygeorchestra" --inventory-file=hosts --extra-vars={"ansible_ssh_host":"127.0.0.1","ansible_ssh_user":"vagrant","ansible_ssh_port":9999} -v playbooks/georchestra.yml
Using /home/fvanderbiest/workspace/georchestra/ansible/ansible.cfg as config file
[DEPRECATION WARNING]: [defaults]hostfile option, The key is misleading as it
can also be a list of hosts, a directory or a list of paths , use [defaults]
inventory=/path/to/file|dir instead. This feature will be removed in version
2.8. Deprecation warnings can be disabled by setting deprecation_warnings=False
in ansible.cfg.

keyboard layout

When exporting and importing the vagrant-generated VM in another environment, we noticed that the keyboard layout is qwerty by default. This can be annoying...

We've had to change the XKBLAYOUT="us" line in /etc/default/keyboard.

Should we change the vagrantfile to take this into account or should this be taken care of by the ansible recipe ? Option 1 seems fine to me.

[ Configuration ] SQL urls

checkout geonetwork datadir - destination path '/srv/data/geonetwork' already exists and is not an empty directory

TASK: [georchestra | checkout geonetwork datadir] ***************************** 
failed: [default] => {"cmd": "/usr/bin/git clone --origin origin --recursive https://github.com/georchestra/geonetwork_minimal_datadir /srv/data/geonetwork", "failed": true, "rc": 128}
stderr: fatal: destination path '/srv/data/geonetwork' already exists and is not an empty directory.

msg: fatal: destination path '/srv/data/geonetwork' already exists and is not an empty directory.

FATAL: all hosts have already failed -- aborting

ALLOW_WORLD_READABLE_TMPFILES deprecated

[DEPRECATION WARNING]: ALLOW_WORLD_READABLE_TMPFILES option, moved to a per
plugin approach that is more flexible, use mostly the same config will work,
but now controlled from the plugin itself and not using the general constant.
instead. This feature will be removed from ansible-base in version 2.14.
Deprecation warnings can be disabled by setting deprecation_warnings=False in
ansible.cfg.

Could not find the requested service tomcat@...

Hello,

I'm trying to deploy georchestra via ansible but I still get this message at the end of the script:

failed: [mygeorchestra] (item=dict_keys(['proxycas', 'georchestra', 'geoserver'])) => {"changed": false, "item": "dict_keys(['proxycas', 'georchestra', 'geoserver'])", "msg": "Could not find the requested service tomcat@dict_keys(['proxycas', 'georchestra', 'geoserver']): host"}

I have the impression that the tomcat services have not been created but I have no error message to that effect. Where did I get it wrong?
Thank you in advance for your help.

Mak '

add ability to configure smtp server

Currently hardcoded:

roles/georchestra/templates/extractorapp/extractorapp.properties.j2:smtpHost=localhost
roles/georchestra/templates/extractorapp/extractorapp.properties.j2:smtpPort=25
roles/georchestra/templates/ldapadmin/ldapadmin.properties.j2:smtpHost=localhost
roles/georchestra/templates/ldapadmin/ldapadmin.properties.j2:smtpPort=25

Terranis might be interested in using sendgrid instead.

postgresql | create georchestra user fails

With up to date sources, and no local additions,

TASK: [postgresql | create georchestra user] ********************************** 
failed: [mygeorchestra] => {"failed": true}
msg: unable to connect to database: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?


FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/home/fvanderbiest/georchestra.retry

mygeorchestra              : ok=17   changed=14   unreachable=0    failed=1   

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

[ Encoding ] Console

When I use the playbook to install geOrchestra, I have errors with encoding character in console.

Encoding errors comes on all fields.

Step to reproduce :

Création new account with accent in name or any attribut :
image

Go to admin to validate account, user have good encoding char :
image

Before validate user :
image

After validate user and click on save :
image

Each time I try to update a user I have additional characters, samething on all element from console (User and Organisme)

Before click on save, information are OK in LDAP, after they are wrong.

I have the same console.war manually installed on a tomcat8/debian9 instance and I don't have this issue. I guess it comes from tomcat9 or debian10 but I can't manage to find what is the problem.

I had a look at currents issues in geOrchestra and find some interresting conversation, but no reason why this occured.

georchestra/georchestra#3049
georchestra/georchestra#3021
georchestra/georchestra#2996
georchestra/georchestra#2737
georchestra/georchestra#2693

Does anyone have the same error with this ansible playbook ?

[DEPRECATION WARNING]: Invoking "apt" only once while using a loop via squash_actions is deprecated

TASK [postgresql : installing dependencies] 
[DEPRECATION WARNING]: Invoking "apt" only once while using a loop via squash_actions 
is deprecated. Instead of using a loop to supply multiple items and specifying `name: {{ item }}`, 
please use `name: [u'postgresql-9.6-postgis-2.3', u'postgresql-9.6-postgis-2.3-scripts', u'postgresql-contrib-9.6', u'postgis']` 
and remove the loop. This feature will be removed in version 2.11. Deprecation warnings can be 
disabled by setting deprecation_warnings=False in ansible.cfg.

starting tomcat-georchestra failed

TASK: [tomcat | start instance] *********************************************** 
changed: [default] => (item=proxycas)
failed: [default] => (item=georchestra) => {"failed": true, "item": "georchestra"}
msg: Starting Tomcat servlet engine: tomcat-georchestra failed!

failed: [default] => (item=geoserver) => {"failed": true, "item": "geoserver"}
msg: Starting Tomcat servlet engine: tomcat-geoserver failed!

ansible book not running on xubuntu 14.04.05

Using xubuntu 14.04.5 LTS and after downloading the zip repo the ansible playbook did not run.

I used sudo with the default command and it didn't work.

The ansible book georchestra.yml was updated, mainly the hosts to localhost or local ip 127.0.0.1 but it returned the attached error triggered by openldap.

georchestrra.yml:
georchestra.txt

ansible terminal log:
ansible.txt

mapfishapp db services are broken

2016-02-14 14:27:29 ws [ERROR] org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user "www-data")

are hard link necessary ?

when src and dest are not on the same device, the hard link creation fails.
in roles/georchestra/tasks/nativelibs.yml, we have :

  • name: symlink gdal.jar to tomcat shared dir
    file: src=/usr/share/java/gdal.jar dest={{ tomcat_basedir }}/georchestra/shared/gdal.jar state=link
  • name: hardlink gdal.jar to geoserver libdir
    file: src=/usr/share/java/gdal.jar dest={{ tomcat_basedir }}/geoserver/webapps/geoserver/WEB-INF/lib/gdal.jar state=hard
    it fails with this message :
    TASK: [georchestra | hardlink gdal.jar to geoserver libdir] *******************
    failed: [georchestra-ppd] => {"failed": true, "path": "/opt/tomcat/geoserver/webapps/geoserver/WEB-INF/lib/gdal.jar", "state": "absent"}
    msg: Error while linking: [Errno 18] Invalid cross-device link
    FATAL: all hosts have already failed -- aborting

question : is hard link necessary ?

Failed to find handler to unarchive

TASK: [georchestra | unzip WARs] ********************************************** 
failed: [default] => (item={'key': 'catalogapp', 'value': {'url': 'catalogapp', 'job': 'georchestra-template', 'tomcat': 'georchestra'}}) => {"failed": true, "item": {"key": "catalogapp", "value": {"job": "georchestra-template", "tomcat": "georchestra", "url": "catalogapp"}}}
msg: Failed to find handler to unarchive. Make sure the required command to extract the file is installed.

Fixed with sudo apt-get install unzip in guest.

Update to work with geOrchestra master

In the main README, I added the following sentence: "Very recently, in June 2016, developments (which happen in geOrchestra's master branch for the 16.12 release) led to breaking changes in the LDAP data model, which, to date, have not been ported to this repository. There's currently no guarantee that the security system works if you deploy a geOrchestra SDI with this ansible recipe for the moment."
See georchestra/georchestra#1415

Maybe it's also time for branches in the current repository ?

[ Configuration ] ansible_ssh_user

Hello, it's not really an issue, but it could help for installation.

When launching playbook with another user than root, I got the error

UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Permission denied (publickey,password).\r\n", "unreachable": true

To solve this, just add ansible_ssh_user=root in the hosts file.

Regards

Use system truststore

Pierre recommends using the system wide truststore instead of using a custom one for every tomcat.

This means:

  • getting the certificate from openssl s_client -connect localhost:443
  • inserting it into /usr/local/share/ca-certificates/georchestra.crt
  • running update-ca-certificates
  • removing tomcat options javax.net.ssl.trustStore*

Ansible Debian 9 vers Debian 8

Hello,
just to let you know.
I have used this playbook to install from a debian8 to a debian8 server and it worked perfectly.

I am know lanching ansible playbook from a Debian 9 to install georchestra on a remote debian8 server.
I had several issues that I'd like to share, to keep a trace.

First, default version of Ansible on debian 9, is not compatible with the georchestra playbook. Some module attributes have changed in recent Ansible version.
I have reinstall Ansible using https://linuxconfig.org/ansible-installation-on-debian-9-stretch-linux-from-source to be able to change version. Be carefull python version need as well to be changed via pip.

Then I didn't manage to make playbook working with a another user than root. Each time the ssh connection failed.
I have create an ssh passphrase with other users, but ansible failed to connect each time even in sudo.
If i add -vvvv to view the error we can see, there is no user set for connection

Using module file /usr/lib/python2.7/dist-packages/ansible/modules/core/system/setup.py <192.168.1.13> ESTABLISH SSH CONNECTION FOR USER: None <192.168.1.13> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/pierre/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.1.13 '/bin/sh -c '"'"'( umask 77 && mkdir -p " echo ~/.ansible/tmp/ansible-tmp-1509962416.62-118707537641112 " && echo ansible-tmp-1509962416.62-118707537641112=" echo ~/.ansible/tmp/ansible-tmp-1509962416.62-118707537641112 " ) && sleep 0'"'"''

Using root user, it works and we can see

<192.168.1.13> ESTABLISH SSH CONNECTION FOR USER: Root

Now, I have an other issue, when it try to install slap, it fails
I am working on the solution, I think it's because of python version. Here is the trace, it seems to be on unknow attribute SSL_ST_INIT for installation.

failed: [mygeorchestra] (item=[u'git', u'slapd', u'ldap-utils']) => { "failed": true, "invocation": { "module_name": "apt" }, "item": [ "git", "slapd", "ldap-utils" ], "module_stderr": "OpenSSH_7.4p1 Debian-10+deb9u1, OpenSSL 1.0.2l 25 May 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 6879\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 192.168.1.13 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/tmp/ansible_t4uEl_/ansible_module_apt.py\", line 208, in <module>\r\n from ansible.module_utils.urls import fetch_url\r\n File \"/tmp/ansible_t4uEl_/ansible_modlib.zip/ansible/module_utils/urls.py\", line 150, in <module>\r\n File \"/usr/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py\", line 55, in <module>\r\n import OpenSSL.SSL\r\n File \"/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py\", line 8, in <module>\r\n from OpenSSL import rand, crypto, SSL\r\n File \"/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py\", line 105, in <module>\r\n SSL_ST_INIT = _lib.SSL_ST_INIT\r\nAttributeError: 'module' object has no attribute 'SSL_ST_INIT'\r\n", "msg": "MODULE FAILURE" }

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.