(py39_galaxy-importer) [nakayama@test]$ python -m galaxy_importer.main --help
usage: main.py [-h] [--git-clone-path GIT_CLONE_PATH] [--output-path OUTPUT_PATH] [--print-result] [--legacy-role] [--namespace NAMESPACE] [file]
Run importer on collection and save result to disk.
positional arguments:
file artifact to import
optional arguments:
-h, --help show this help message and exit
--git-clone-path GIT_CLONE_PATH
git directory with collection that will get built
--output-path OUTPUT_PATH
path where built collection will be stored
--print-result print importer result to console
--legacy-role import a legacy role rather than collection
--namespace NAMESPACE
namespace of the legacy role to import
(py39_galaxy-importer) [nakayama@test]$
[nakayama@test]$ podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> d5ddca2777a0 53 seconds ago 2.06 GB ★テスト実行してるコンテナ(終わったら消える)
quay.io/ansible/default-test-container 7.14.0 a47d0ef8edf2 7 months ago 1.6 GB
quay.io/ansible/base-test-container 4.1.0 e0fc2e4eb2fd 8 months ago 1.29 GB
quay.io/ansible/ansible-test-utility-container 2.0.0 846c88fea76d 12 months ago 7.7 MB
[nakayama@test]$
podman ps(ansible-test 実行中)
[nakayama@test]$ podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b4b95f37c1fc d5ddca2777a016ed1f5619e348b24f53c3bfbbf9d352908b13dbe6f025d8355d LOCAL_IMAGE_RUNNE... 54 seconds ago Up 54 seconds focused_chebyshev
[nakayama@test]$ podman ps
raise IDNAError('The label {0} is not a valid A-label'.format(label))\nidna.core.IDNAError: The label centos7_nedved is not a valid A-label\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
エラー全文
TASK [pulp.pulp_installer.pulp_webserver : Generate CA CSR] *******************************************************************************************************************************************************************************
task path: /home/xxxx/.ansible/collections/ansible_collections/pulp/pulp_installer/roles/pulp_webserver/tasks/generate_tls_certificates.yml:21
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: xxxx
<localhost> EXEC /bin/sh -c 'echo ~xxxx && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/xxxx/.ansible/tmp `"&& mkdir "` echo /home/xxxx/.ansible/tmp/ansible-tmp-1610629541.8-18196-180460235469601 `" && echo ansible-tmp-1610629541.8-18196-180460235469601="` echo /home/xxxx/.ansible/tmp/ansible-tmp-1610629541.8-18196-180460235469601 `" ) && sleep 0'
Using module file /usr/lib/python2.7/site-packages/ansible/modules/crypto/openssl_csr.py
<localhost> PUT /home/xxxx/.ansible/tmp/ansible-local-14498dKbVFf/tmp86hqnb TO /home/xxxx/.ansible/tmp/ansible-tmp-1610629541.8-18196-180460235469601/AnsiballZ_openssl_csr.py
<localhost> EXEC /bin/sh -c 'chmod u+x /home/xxxx/.ansible/tmp/ansible-tmp-1610629541.8-18196-180460235469601/ /home/xxxx/.ansible/tmp/ansible-tmp-1610629541.8-18196-180460235469601/AnsiballZ_openssl_csr.py && sleep 0'
<localhost> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-rxtnhhscpjnhifwlnurttrvekxivqilc ; DJANGO_SETTINGS_MODULE=pulpcore.app.settings /usr/bin/python /home/xxxx/.ansible/tmp/ansible-tmp-1610629541.8-18196-180460235469601/AnsiballZ_openssl_csr.py'"'"' && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /home/xxxx/.ansible/tmp/ansible-tmp-1610629541.8-18196-180460235469601/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/home/xxxx/.ansible/tmp/ansible-tmp-1610629541.8-18196-180460235469601/AnsiballZ_openssl_csr.py", line 102, in <module>
_ansiballz_main()
File "/home/xxxx/.ansible/tmp/ansible-tmp-1610629541.8-18196-180460235469601/AnsiballZ_openssl_csr.py", line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/xxxx/.ansible/tmp/ansible-tmp-1610629541.8-18196-180460235469601/AnsiballZ_openssl_csr.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible.modules.crypto.openssl_csr', init_globals=None, run_name='__main__', alter_sys=True)
File "/usr/lib64/python2.7/runpy.py", line 176, in run_module
fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 82, in _run_module_code
mod_name, mod_fname, mod_loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/tmp/ansible_openssl_csr_payload_XSwXCN/ansible_openssl_csr_payload.zip/ansible/modules/crypto/openssl_csr.py", line 1105, in <module>
File "/tmp/ansible_openssl_csr_payload_XSwXCN/ansible_openssl_csr_payload.zip/ansible/modules/crypto/openssl_csr.py", line 1088, in main
File "/tmp/ansible_openssl_csr_payload_XSwXCN/ansible_openssl_csr_payload.zip/ansible/modules/crypto/openssl_csr.py", line 541, in generate
File "/tmp/ansible_openssl_csr_payload_XSwXCN/ansible_openssl_csr_payload.zip/ansible/modules/crypto/openssl_csr.py", line 834, in _generate_csr
File "/usr/lib64/python2.7/site-packages/cryptography/x509/base.py", line 393, in sign
return backend.create_x509_csr(self, private_key, algorithm)
File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/multibackend.py", line 395, in create_x509_csr
return b.create_x509_csr(builder, private_key, algorithm)
File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 793, in create_x509_csr
gc=False
File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 1009, in _create_x509_extensions
handlers, extension
File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 1040, in _create_x509_extension
ext_struct = encode(self, extension.value)
File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/encode_asn1.py", line 359, in _encode_alt_name
general_names = _encode_general_names(backend, san)
File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/encode_asn1.py", line 351, in _encode_general_names
gn = _encode_general_name(backend, name)
File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/encode_asn1.py", line 387, in _encode_general_name
value = _idna_encode(name.value)
File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/encode_asn1.py", line 376, in _idna_encode
return idna.encode(value)
File "/usr/lib/python2.7/site-packages/idna/core.py", line 355, in encode
result.append(alabel(label))
File "/usr/lib/python2.7/site-packages/idna/core.py", line 265, in alabel
raise IDNAError('The label {0} is not a valid A-label'.format(label))
idna.core.IDNAError: The label centos7_nedved is not a valid A-label
fatal: [localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File \"/home/xxxx/.ansible/tmp/ansible-tmp-1610629541.8-18196-180460235469601/AnsiballZ_openssl_csr.py\", line 102, in <module>\n _ansiballz_main()\n File \"/home/xxxx/.ansible/tmp/ansible-tmp-1610629541.8-18196-180460235469601/AnsiballZ_openssl_csr.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/xxxx/.ansible/tmp/ansible-tmp-1610629541.8-18196-180460235469601/AnsiballZ_openssl_csr.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.crypto.openssl_csr', init_globals=None, run_name='__main__', alter_sys=True)\n File \"/usr/lib64/python2.7/runpy.py\", line 176, in run_module\n fname, loader, pkg_name)\n File \"/usr/lib64/python2.7/runpy.py\", line 82, in _run_module_code\n mod_name, mod_fname, mod_loader, pkg_name)\n File \"/usr/lib64/python2.7/runpy.py\", line 72, in _run_code\n exec code in run_globals\n File \"/tmp/ansible_openssl_csr_payload_XSwXCN/ansible_openssl_csr_payload.zip/ansible/modules/crypto/openssl_csr.py\", line 1105, in <module>\n File \"/tmp/ansible_openssl_csr_payload_XSwXCN/ansible_openssl_csr_payload.zip/ansible/modules/crypto/openssl_csr.py\", line 1088, in main\n File \"/tmp/ansible_openssl_csr_payload_XSwXCN/ansible_openssl_csr_payload.zip/ansible/modules/crypto/openssl_csr.py\", line 541, in generate\n File \"/tmp/ansible_openssl_csr_payload_XSwXCN/ansible_openssl_csr_payload.zip/ansible/modules/crypto/openssl_csr.py\", line 834, in _generate_csr\n File \"/usr/lib64/python2.7/site-packages/cryptography/x509/base.py\", line 393, in sign\n return backend.create_x509_csr(self, private_key, algorithm)\n File \"/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/multibackend.py\", line 395, in create_x509_csr\n return b.create_x509_csr(builder, private_key, algorithm)\n File \"/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py\", line 793, in create_x509_csr\n gc=False\n File \"/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py\", line 1009, in _create_x509_extensions\n handlers, extension\n File \"/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py\", line 1040, in _create_x509_extension\n ext_struct = encode(self, extension.value)\n File \"/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/encode_asn1.py\", line 359, in _encode_alt_name\n general_names = _encode_general_names(backend, san)\n File \"/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/encode_asn1.py\", line 351, in _encode_general_names\n gn = _encode_general_name(backend, name)\n File \"/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/encode_asn1.py\", line 387, in _encode_general_name\n value = _idna_encode(name.value)\n File \"/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/encode_asn1.py\", line 376, in _idna_encode\n return idna.encode(value)\n File \"/usr/lib/python2.7/site-packages/idna/core.py\", line 355, in encode\n result.append(alabel(label))\n File \"/usr/lib/python2.7/site-packages/idna/core.py\", line 265, in alabel\n raise IDNAError('The label {0} is not a valid A-label'.format(label))\nidna.core.IDNAError: The label centos7_nedved is not a valid A-label\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
PLAY RECAP ********************************************************************************************************************************************************************************************************************************
localhost : ok=96 changed=32 unreachable=0 failed=1 skipped=38 rescued=0 ignored=0
$
Ansible Night in Tokyo 2019.04 Red Hat Tech Night 2019.05
Ansible Night in Tokyo 2019.07
ssmjp 2019/08
ネットワークプログラマビリティ勉強会 #18 IIJ Technical NIGHT vol.8
CI/CD Test Night #5
Ansibleもくもく会 (サーバ編 & NW編)2019.11
第3回 Red Hat Tech Night 2019.11.15
Ansiblejpネットワーク部 2019.11
Ansible Night in Tokyo 2019.11
※リモート参加含む
今回「Playbookで指定できる文字」で触れる部分ですが、もっと具体的にいうと「list型」で指定できる文字種となります。
これは例えばネットワーク機器で状態取得系のコマンドを指定する ios_commandモジュールのcommandsオプションであったり、telnetモジュールのcommandオプションなどが使っている型となります。 ios_commandでは、
「List of commands to send to the remote ios device over~」
と説明もされていますね。
また、
ソース上ではtype='list'と指定している部分のオプションとなります。
ERROR! Syntax Error while loading YAML.
expected URI, but found '#'
The error appears to be in '/xxx/xxx/xxx/ios_command.yml': line 19, column 12, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
commands:
- !#"$%&'()*+,-./0123456789:;<=>?@A BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghIjklmnopqrstuvwxyz{|}~
^ here
commands:
- "!#"$%&'()*+,-./0123456789:;<=>?@A BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghIjklmnopqrstuvwxyz{|}~"
^ here
We could be wrong, but this one looks like it might be an issue with
unbalanced quotes. If starting a value with a quote, make sure the
line ends with the same set of quotes. For instance this arbitrary
example:
foo: "bad" "wolf"
Could be written as:
foo: '"bad" "wolf"'