Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debops owncloud: KeyError: 'undefined variable: 0'" #76

Open
jbicha opened this issue Jan 13, 2017 · 3 comments
Open

debops owncloud: KeyError: 'undefined variable: 0'" #76

jbicha opened this issue Jan 13, 2017 · 3 comments

Comments

@jbicha
Copy link
Contributor

jbicha commented Jan 13, 2017

If I list my Ubuntu server under [debops_service_nginx] and run $ debops , the run completes successfully. If I add it to [debops_service_owncloud], it fails. Errors posted below.

TASK [debops.nginx : Create global webroot directories if allowed] *************
task path: /home/jeremy/.local/share/debops/debops-playbooks/roles/debops.nginx/tasks/nginx_servers.yml:3
ok: [example.bicha.net] => (item={u'welcome_domain': u'bicha.net', u'welcome': True, u'enabled': True, u'name': [u'welcome']}) => {
    "changed": false, 
    "diff": {
        "after": {
            "path": "/srv/www/sites/welcome/public"
        }, 
        "before": {
            "path": "/srv/www/sites/welcome/public"
        }
    }, 
    "gid": 0, 
    "group": "root", 
    "invocation": {
        "module_args": {
            "backup": null, 
            "content": null, 
            "delimiter": null, 
            "diff_peek": null, 
            "directory_mode": null, 
            "follow": false, 
            "force": false, 
            "group": "root", 
            "mode": "0755", 
            "original_basename": null, 
            "owner": "root", 
            "path": "/srv/www/sites/welcome/public", 
            "recurse": false, 
            "regexp": null, 
            "remote_src": null, 
            "selevel": null, 
            "serole": null, 
            "setype": null, 
            "seuser": null, 
            "src": null, 
            "state": "directory", 
            "unsafe_writes": null, 
            "validate": null
        }, 
        "module_name": "file"
    }, 
    "item": {
        "enabled": true, 
        "name": [
            "welcome"
        ], 
        "welcome": true, 
        "welcome_domain": "bicha.net"
    }, 
    "mode": "0755", 
    "owner": "root", 
    "path": "/srv/www/sites/welcome/public", 
    "size": 2, 
    "state": "directory", 
    "uid": 0
}
ok: [example.bicha.net] => (item={u'name': [u'localhost', u'127.0.0.1', u'[::1]'], u'acme': False, u'welcome': True, u'enabled': True, u'ssl': False, u'welcome_css': False}) => {
    "changed": false, 
    "diff": {
        "after": {
            "path": "/srv/www/sites/localhost/public"
        }, 
        "before": {
            "path": "/srv/www/sites/localhost/public"
        }
    }, 
    "gid": 0, 
    "group": "root", 
    "invocation": {
        "module_args": {
            "backup": null, 
            "content": null, 
            "delimiter": null, 
            "diff_peek": null, 
            "directory_mode": null, 
            "follow": false, 
            "force": false, 
            "group": "root", 
            "mode": "0755", 
            "original_basename": null, 
            "owner": "root", 
            "path": "/srv/www/sites/localhost/public", 
            "recurse": false, 
            "regexp": null, 
            "remote_src": null, 
            "selevel": null, 
            "serole": null, 
            "setype": null, 
            "seuser": null, 
            "src": null, 
            "state": "directory", 
            "unsafe_writes": null, 
            "validate": null
        }, 
        "module_name": "file"
    }, 
    "item": {
        "acme": false, 
        "enabled": true, 
        "name": [
            "localhost", 
            "127.0.0.1", 
            "[::1]"
        ], 
        "ssl": false, 
        "welcome": true, 
        "welcome_css": false
    }, 
    "mode": "0755", 
    "owner": "root", 
    "path": "/srv/www/sites/localhost/public", 
    "size": 3, 
    "state": "directory", 
    "uid": 0
}

TASK [debops.nginx : Create default welcome page if enabled] *******************
task path: /home/jeremy/.local/share/debops/debops-playbooks/roles/debops.nginx/tasks/nginx_servers.yml:22
failed: [example.bicha.net] (item={u'welcome_domain': u'bicha.net', u'welcome': True, u'enabled': True, u'name': [u'welcome']}) => {
    "failed": true, 
    "invocation": {
        "module_args": {
            "dest": "/srv/www/sites/welcome/public/index.html", 
            "force": false, 
            "group": "root", 
            "owner": "root", 
            "src": "srv/www/sites/welcome/public/index.html.j2"
        }, 
        "module_name": "template"
    }, 
    "item": {
        "enabled": true, 
        "name": [
            "welcome"
        ], 
        "welcome": true, 
        "welcome_domain": "bicha.net"
    }, 
    "msg": "KeyError: 'undefined variable: 0'"
}
@jbicha
Copy link
Contributor Author

jbicha commented Jan 14, 2017

I think I was able to work around this by setting
nginx_webroot_create: False

@ypid
Copy link
Member

ypid commented Jan 14, 2017

Thanks for reporting. Wired. The ownCloud role should not effect the "Create default welcome page if enabled" task. Can you try with Ansible 2.1.3? Also, the role versions I test can be found here: https://github.com/ypid/ypid-ansible-common/ or refer to the CI tests for a working test case.

@splitice
Copy link

Not a user of owncloud but found this issue when looking for the solution to a bug with the same dependency.

Can confirm that upgrading to ansible 2.2.1 resolve the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants