Skip to content

Instantly share code, notes, and snippets.

@cognifloyd
Last active November 20, 2018 17:42
Show Gist options
  • Save cognifloyd/0c262a669c1b34c80b420bb3b401d950 to your computer and use it in GitHub Desktop.
Save cognifloyd/0c262a669c1b34c80b420bb3b401d950 to your computer and use it in GitHub Desktop.
part of playbook output showing a type_debug|value of var and then the error displayed when using that var with the group module
________________________________________
< TASK [theatro-noc.share_drive : debug] >
----------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
task path: /home/cognifloyd/p/theatro-ansiblehost/ansible-playbooks.git/roles/theatro-noc.share_drive/tasks/Linux.yaml:35
ok: [devopsvagrant] => {
"msg": "AnsibleVaultEncryptedUnicode|encryptedgroupname"
}
_____________________________________________________________
/ TASK [theatro-noc.share_drive : Add the NFS access group to \
\ access the NAS] /
-------------------------------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
task path: /home/cognifloyd/p/theatro-ansiblehost/ansible-playbooks.git/roles/theatro-noc.share_drive/tasks/Linux.yaml:38
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: u'encryptedgroupname' is not JSON serializable
fatal: [devopsvagrant]: FAILED! => {"msg": "Unexpected failure during module execution.", "stdout": ""}
to retry, use: --limit @/home/cognifloyd/.ansible/retry/devops_controller.playbook.retry
____________
< PLAY RECAP >
------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
devopsvagrant : ok=24 changed=0 unreachable=0 failed=1
- debug:
msg: "{{ nas_group_name | type_debug }}|{{ nas_group_name }}"
- name: Add the NFS access group to access the NAS
become: yes
group:
name: "{{ nas_group_name }}"
gid: "{{ nas_group_id }}"
when: nas
<127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: vagrant
<127.0.0.1> SSH: EXEC ssh -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=2222 -o 'IdentityFile="/home/cognifloyd/p/theatro-ansiblehost/ansible-playbooks.git/vagrant/devops/.vagrant/machines/devopsvagrant/virtualbox/private_key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=30 -o ControlPath=/home/cognifloyd/.theatro/ssh-cp/%h-%p-%r 127.0.0.1 '/bin/sh -c '"'"'echo ~vagrant && sleep 0'"'"''
<127.0.0.1> (0, '/home/vagrant\n', '')
<127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: vagrant
<127.0.0.1> SSH: EXEC ssh -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=2222 -o 'IdentityFile="/home/cognifloyd/p/theatro-ansiblehost/ansible-playbooks.git/vagrant/devops/.vagrant/machines/devopsvagrant/virtualbox/private_key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=30 -o ControlPath=/home/cognifloyd/.theatro/ssh-cp/%h-%p-%r 127.0.0.1 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/vagrant/.ansible/tmp/ansible-tmp-1542735400.33-93337997583736 `" && echo ansible-tmp-1542735400.33-93337997583736="` echo /home/vagrant/.ansible/tmp/ansible-tmp-1542735400.33-93337997583736 `" ) && sleep 0'"'"''
<127.0.0.1> (0, 'ansible-tmp-1542735400.33-93337997583736=/home/vagrant/.ansible/tmp/ansible-tmp-1542735400.33-93337997583736\n', '')
The full traceback is:
Traceback (most recent call last):
File "/home/cognifloyd/v/st2/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 139, in run
res = self._execute()
File "/home/cognifloyd/v/st2/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 603, in _execute
result = self._handler.run(task_vars=variables)
File "/home/cognifloyd/v/st2/lib/python2.7/site-packages/ansible/plugins/action/normal.py", line 46, in run
result = merge_hash(result, self._execute_module(task_vars=task_vars, wrap_async=wrap_async))
File "/home/cognifloyd/v/st2/lib/python2.7/site-packages/ansible/plugins/action/__init__.py", line 738, in _execute_module
(module_style, shebang, module_data, module_path) = self._configure_module(module_name=module_name, module_args=module_args, task_vars=task_vars)
File "/home/cognifloyd/v/st2/lib/python2.7/site-packages/ansible/plugins/action/__init__.py", line 177, in _configure_module
environment=final_environment)
File "/home/cognifloyd/v/st2/lib/python2.7/site-packages/ansible/executor/module_common.py", line 972, in modify_module
environment=environment)
File "/home/cognifloyd/v/st2/lib/python2.7/site-packages/ansible/executor/module_common.py", line 742, in _find_module_utils
python_repred_params = repr(json.dumps(params))
File "/usr/lib64/python2.7/json/__init__.py", line 244, in dumps
return _default_encoder.encode(obj)
File "/usr/lib64/python2.7/json/encoder.py", line 207, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib64/python2.7/json/encoder.py", line 270, in iterencode
return _iterencode(o, 0)
File "/usr/lib64/python2.7/json/encoder.py", line 184, in default
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: u'encryptedgroupname' is not JSON serializable
fatal: [devopsvagrant]: FAILED! => {
"msg": "Unexpected failure during module execution.",
"stdout": ""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment