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

Please enlighten me how to workaround this particular failure I noted #174

Open
lvnilesh opened this issue Oct 27, 2016 · 12 comments
Open

Comments

@lvnilesh
Copy link
Contributor

First time using debops.

I ran debops against a target machine 10.0.1.22 in local network and noted this failure. Can you please enlighten me?

failed: [10.0.1.22 -> localhost] (item={u'subdomain': u'root-ca', u'subject': [u'o=Chromebox Certificate Authority'], u'name': u'root', u'key_size': u'4096'}) => {"changed": true, "cmd": ["./lib/pki-authority", "init", "--name", "root", "--default-sign-base", "365", "--root-sign-multiplier", "12", "--ca-sign-multiplier", "10", "--cert-sign-multiplier", "3"], "delta": "0:00:00.020428", "end": "2016-10-26 17:17:10.360078", "failed": true, "item": {"key_size": "4096", "name": "root", "subdomain": "root-ca", "subject": ["o=Chromebox Certificate Authority"]}, "rc": 2, "start": "2016-10-26 17:17:10.339650", "stderr": "./lib/pki-authority: line 111: declare: -g: invalid option\ndeclare: usage: declare [-afFirtx] [-p] [name[=value] ...]", "stdout": "", "stdout_lines": [], "warnings": []}
failed: [10.0.1.22 -> localhost] (item={u'name': u'domain', u'key_size': u'4096', u'subdomain': u'domain-ca', u'issuer_name': u'root', u'subject': [u'o=Chromebox', u'ou=Domain CA']}) => {"changed": true, "cmd": ["./lib/pki-authority", "init", "--name", "domain", "--default-sign-base", "365", "--root-sign-multiplier", "12", "--ca-sign-multiplier", "10", "--cert-sign-multiplier", "3"], "delta": "0:00:00.009126", "end": "2016-10-26 17:17:10.529653", "failed": true, "item": {"issuer_name": "root", "key_size": "4096", "name": "domain", "subdomain": "domain-ca", "subject": ["o=Chromebox", "ou=Domain CA"]}, "rc": 2, "start": "2016-10-26 17:17:10.520527", "stderr": "./lib/pki-authority: line 111: declare: -g: invalid option\ndeclare: usage: declare [-afFirtx] [-p] [name[=value] ...]", "stdout": "", "stdout_lines": [], "warnings": []}
@lvnilesh
Copy link
Contributor Author

@lvnilesh
Copy link
Contributor Author

./lib/pki-authority: line 111: 
    declare: -g: invalid option

declare: usage: 
    declare [-afFirtx] [-p] [name[=value] ...]

@lvnilesh
Copy link
Contributor Author

My 10.0.1.22 is Ubuntu 16.04 not pure debian.

@lvnilesh
Copy link
Contributor Author

Strange.

ssh 10.0.1.22

root@chromebox:~# declare -gA config
root@chromebox:~# 

@lvnilesh
Copy link
Contributor Author

Here is the play recap:

PLAY RECAP *********************************************************************
10.0.1.22                  : ok=50   changed=0    unreachable=0    failed=1   

TASK: debops.core : Create root directories ----------------------------- 2.62s
TASK: debops.apt_preferences : Remove legacy APT preferences ------------ 1.72s
TASK: debops.secret : Create secret directories on Ansible Controller --- 1.70s
TASK: debops.core : Save local facts ------------------------------------ 1.46s
TASK: debops.core : Install local fact scripts -------------------------- 1.05s
TASK: setup ------------------------------------------------------------- 0.89s
TASK: debops.apt_preferences : Remove APT preferences ------------------- 0.85s
TASK: setup ------------------------------------------------------------- 0.79s
TASK: debops.core : Install required core packages ---------------------- 0.67s
TASK: debops.dhparam : Install encryption software ---------------------- 0.63s

@drybjed
Copy link
Member

drybjed commented Oct 27, 2016

On Ansible Controller, you need at least bash 4.x for the debops.pki role to work correctly.

@ypid
Copy link
Member

ypid commented Oct 27, 2016

@drybjed Would it make sense to include a check for the Bash version also on the Ansible controller so that this becomes a little bit easier to debug?

@drybjed
Copy link
Member

drybjed commented Oct 27, 2016

@ypid I thought about the same thing. Perhaps the pki-authority script could check the bash version and exit early with an error message that explains what the issue is.

@ypid
Copy link
Member

ypid commented Oct 27, 2016

Sounds good.

@lvnilesh
Copy link
Contributor Author

I am using

zsh --version
zsh 5.2 (x86_64-apple-darwin15.0.0)

@drybjed
Copy link
Member

drybjed commented Oct 28, 2016

@lvnilesh This doesn't really matter in the context of a script interpreter, which woul be /bin/bash. Check your Bash version, mine is:

$ bash --version
GNU bash, version 4.3.30(1)-release (x86_64-pc-linux-gnu)

@lvnilesh
Copy link
Contributor Author

bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)
Copyright (C) 2007 Free Software Foundation, Inc.

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

No branches or pull requests

3 participants