stationgroup / ansible-experiments

⚠️ [Moved to r21.io] Ansible experimentation
https://gitlab.com/stationgroup/ansible-experiments
MIT License
2 stars 2 forks source link

Bug - setup-requirements.sh #4

Closed reelsense closed 6 years ago

reelsense commented 6 years ago

Ubuntu Bugs

MIGHT HAVE FIXED THIS ubuntu1 fails at this step every time until apt update is run.

PLAY [install ubuntu1 node as ansible control machine] *********************************************

TASK [Gathering Facts] *****************************************************************************
ok: [ubuntu1]

TASK [apt] *****************************************************************************************
fatal: [ubuntu1]: FAILED! => {"changed": false, "msg": "No package matching 'python3-pip' is available"}

setup-requirements should run apt update first on Ubuntu systems (maybe pkg update on FreeBSD too?).


Once you get past the first bug by running apt update, ansible will say it failed again durring the python pip step.

PLAY [install ubuntu1 node as ansible control machine] *********************************************

TASK [Gathering Facts] *****************************************************************************
ok: [ubuntu1]

TASK [apt] *****************************************************************************************
changed: [ubuntu1]

TASK [pip] *****************************************************************************************
fatal: [ubuntu1]: FAILED! => {"changed": false, "cmd": "/usr/bin/pip3 install --upgrade pip setuptools cryptography paramiko", "msg": "stdout: Collecting pip\n  Downloading https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl (1.3MB)\nCollecting setuptools\n  Downloading https://files.pythonhosted.org/packages/8c/10/79282747f9169f21c053c562a0baa21815a8c7879be97abd930dbcf862e8/setuptools-39.1.0-py2.py3-none-any.whl (566kB)\nCollecting cryptography\n  Downloading https://files.pythonhosted.org/packages/ec/b2/faa78c1ab928d2b2c634c8b41ff1181f0abdd9adf9193211bd606ffa57e2/cryptography-2.2.2.tar.gz (443kB)\nCollecting paramiko\n  Downloading https://files.pythonhosted.org/packages/3e/db/cb7b6656e0e7387637ce850689084dc0b94b44df31cc52e5fc5c2c4fd2c1/paramiko-2.4.1-py2.py3-none-any.whl (194kB)\nCollecting idna>=2.1 (from cryptography)\n  Downloading https://files.pythonhosted.org/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl (56kB)\nCollecting asn1crypto>=0.21.0 (from cryptography)\n  Downloading https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl (101kB)\nCollecting six>=1.4.1 (from cryptography)\n  Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl\nCollecting cffi>=1.7 (from cryptography)\n  Downloading https://files.pythonhosted.org/packages/59/cc/0e1635b4951021ef35f5c92b32c865ae605fac2a19d724fb6ff99d745c81/cffi-1.11.5-cp35-cp35m-manylinux1_x86_64.whl (420kB)\nCollecting pynacl>=1.0.1 (from paramiko)\n  Downloading https://files.pythonhosted.org/packages/c9/9c/c8d4ae0f590faded4af55381131ad4db8729214eba6537c520622ba3548a/PyNaCl-1.2.1-cp35-cp35m-manylinux1_x86_64.whl (692kB)\nCollecting bcrypt>=3.1.3 (from paramiko)\n  Downloading https://files.pythonhosted.org/packages/72/8d/57da727cbb4ddf0295b0665a93bd8f46fbbd2a48b76cbb0896ca7d27301f/bcrypt-3.1.4-cp35-cp35m-manylinux1_x86_64.whl (54kB)\nCollecting pyasn1>=0.1.7 (from paramiko)\n  Downloading https://files.pythonhosted.org/packages/ba/fe/02e3e2ee243966b143657fb8bd6bc97595841163b6d8c26820944acaec4d/pyasn1-0.4.2-py2.py3-none-any.whl (71kB)\nCollecting pycparser (from cffi>=1.7->cryptography)\n  Downloading https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz (245kB)\nBuilding wheels for collected packages: cryptography, pycparser\n  Running setup.py bdist_wheel for cryptography: started\n  Running setup.py bdist_wheel for cryptography: finished with status 'error'\n  Complete output from command /usr/bin/python3 -u -c \"import setuptools, tokenize;__file__='/tmp/pip-build-2jxl4vu7/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))\" bdist_wheel -d /tmp/tmpz5gbivy9pip-wheel- --python-tag cp35:\n  c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory\n  compilation terminated.\n  Traceback (most recent call last):\n    File \"/usr/lib/python3.5/distutils/unixccompiler.py\", line 118, in _compile\n      extra_postargs)\n    File \"/usr/lib/python3.5/distutils/ccompiler.py\", line 909, in spawn\n      spawn(cmd, dry_run=self.dry_run)\n    File \"/usr/lib/python3.5/distutils/spawn.py\", line 36, in spawn\n      _spawn_posix(cmd, search_path, dry_run=dry_run)\n    File \"/usr/lib/python3.5/distutils/spawn.py\", line 159, in _spawn_posix\n      % (cmd, exit_status))\n  distutils.errors.DistutilsExecError: command 'x86_64-linux-gnu-gcc' failed with exit status 1\n  \n  During handling of the above exception, another exception occurred:\n  \n  Traceback (most recent call last):\n    File \"/usr/lib/python3.5/distutils/core.py\", line 148, in setup\n      dist.run_commands()\n    File \"/usr/lib/python3.5/distutils/dist.py\", line 955, in run_commands\n      self.run_command(cmd)\n    File \"/usr/lib/python3.5/distutils/dist.py\", line 974, in run_command\n      cmd_obj.run()\n    File \"/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py\", line 161, in run\n      cmd = self.call_command('install_lib', warn_dir=0)\n    File \"/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py\", line 147, in call_command\n      self.run_command(cmdname)\n    File \"/usr/lib/python3.5/distutils/cmd.py\", line 313, in run_command\n      self.distribution.run_command(command)\n    File \"/usr/lib/python3.5/distutils/dist.py\", line 974, in run_command\n      cmd_obj.run()\n    File \"/usr/lib/python3/dist-packages/setuptools/command/install_lib.py\", line 23, in run\n      self.build()\n    File \"/usr/lib/python3.5/distutils/command/install_lib.py\", line 109, in build\n      self.run_command('build_ext')\n    File \"/usr/lib/python3.5/distutils/cmd.py\", line 313, in run_command\n      self.distribution.run_command(command)\n    File \"/usr/lib/python3.5/distutils/dist.py\", line 974, in run_command\n      cmd_obj.run()\n    File \"/usr/lib/python3/dist-packages/setuptools/command/build_ext.py\", line 49, in run\n      _build_ext.run(self)\n    File \"/usr/lib/python3.5/distutils/command/build_ext.py\", line 338, in run\n      self.build_extensions()\n    File \"/usr/lib/python3.5/distutils/command/build_ext.py\", line 447, in build_extensions\n      self._build_extensions_serial()\n    File \"/usr/lib/python3.5/distutils/command/build_ext.py\", line 472, in _build_extensions_serial\n      self.build_extension(ext)\n    File \"/usr/lib/python3/dist-packages/setuptools/command/build_ext.py\", line 174, in build_extension\n      _build_ext.build_extension(self, ext)\n    File \"/usr/lib/python3.5/distutils/command/build_ext.py\", line 532, in build_extension\n      depends=ext.depends)\n    File \"/usr/lib/python3.5/distutils/ccompiler.py\", line 574, in compile\n      self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)\n    File \"/usr/lib/python3.5/distutils/unixccompiler.py\", line 120, in _compile\n      raise CompileError(msg)\n  distutils.errors.CompileError: command 'x86_64-linux-gnu-gcc' failed with exit status 1\n  \n  During handling of the above exception, another exception occurred:\n  \n  Traceback (most recent call last):\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 154, in save_modules\n      yield saved\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 195, in setup_context\n      yield\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 243, in run_setup\n      DirectorySandbox(setup_dir).run(runner)\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 273, in run\n      return func()\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 242, in runner\n      _execfile(setup_script, ns)\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 46, in _execfile\n      exec(code, globals, locals)\n    File \"/tmp/easy_install-jfbl1lmw/cffi-1.11.5/setup.py\", line 240, in <module>\n      def run_tests(self):\n    File \"/usr/lib/python3.5/distutils/core.py\", line 163, in setup\n      raise SystemExit(\"error: \" + str(msg))\n  SystemExit: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1\n  \n  During handling of the above exception, another exception occurred:\n  \n  Traceback (most recent call last):\n    File \"/usr/lib/python3/dist-packages/setuptools/command/easy_install.py\", line 1087, in run_setup\n      run_setup(setup_script, args)\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 246, in run_setup\n      raise\n    File \"/usr/lib/python3.5/contextlib.py\", line 77, in __exit__\n      self.gen.throw(type, value, traceback)\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 195, in setup_context\n      yield\n    File \"/usr/lib/python3.5/contextlib.py\", line 77, in __exit__\n      self.gen.throw(type, value, traceback)\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 166, in save_modules\n      saved_exc.resume()\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 141, in resume\n      six.reraise(type, exc, self._tb)\n    File \"/usr/lib/python3/dist-packages/pkg_resources/_vendor/six.py\", line 685, in reraise\n      raise value.with_traceback(tb)\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 154, in save_modules\n      yield saved\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 195, in setup_context\n      yield\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 243, in run_setup\n      DirectorySandbox(setup_dir).run(runner)\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 273, in run\n      return func()\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 242, in runner\n      _execfile(setup_script, ns)\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 46, in _execfile\n      exec(code, globals, locals)\n    File \"/tmp/easy_install-jfbl1lmw/cffi-1.11.5/setup.py\", line 240, in <module>\n      def run_tests(self):\n    File \"/usr/lib/python3.5/distutils/core.py\", line 163, in setup\n      raise SystemExit(\"error: \" + str(msg))\n  SystemExit: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1\n  \n  During handling of the above exception, another exception occurred:\n  \n  Traceback (most recent call last):\n    File \"<string>\", line 1, in <module>\n    File \"/tmp/pip-build-2jxl4vu7/cryptography/setup.py\", line 319, in <module>\n      **keywords_with_side_effects(sys.argv)\n    File \"/usr/lib/python3.5/distutils/core.py\", line 108, in setup\n      _setup_distribution = dist = klass(attrs)\n    File \"/usr/lib/python3/dist-packages/setuptools/dist.py\", line 269, in __init__\n      self.fetch_build_eggs(attrs['setup_requires'])\n    File \"/usr/lib/python3/dist-packages/setuptools/dist.py\", line 313, in fetch_build_eggs\n      replace_conflicting=True,\n    File \"/usr/lib/python3/dist-packages/pkg_resources/__init__.py\", line 826, in resolve\n      dist = best[req.key] = env.best_match(req, ws, installer)\n    File \"/usr/lib/python3/dist-packages/pkg_resources/__init__.py\", line 1092, in best_match\n      return self.obtain(req, installer)\n    File \"/usr/lib/python3/dist-packages/pkg_resources/__init__.py\", line 1104, in obtain\n      return installer(requirement)\n    File \"/usr/lib/python3/dist-packages/setuptools/dist.py\", line 380, in fetch_build_egg\n      return cmd.easy_install(req)\n    File \"/usr/lib/python3/dist-packages/setuptools/command/easy_install.py\", line 663, in easy_install\n      return self.install_item(spec, dist.location, tmpdir, deps)\n    File \"/usr/lib/python3/dist-packages/setuptools/command/easy_install.py\", line 693, in install_item\n      dists = self.install_eggs(spec, download, tmpdir)\n    File \"/usr/lib/python3/dist-packages/setuptools/command/easy_install.py\", line 873, in install_eggs\n      return self.build_and_install(setup_script, setup_base)\n    File \"/usr/lib/python3/dist-packages/setuptools/command/easy_install.py\", line 1101, in build_and_install\n      self.run_setup(setup_script, setup_base, args)\n    File \"/usr/lib/python3/dist-packages/setuptools/command/easy_install.py\", line 1089, in run_setup\n      raise DistutilsError(\"Setup script exited with %s\" % (v.args[0],))\n  distutils.errors.DistutilsError: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1\n  \n  ----------------------------------------\n  Running setup.py clean for cryptography\n  Complete output from command /usr/bin/python3 -u -c \"import setuptools, tokenize;__file__='/tmp/pip-build-2jxl4vu7/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))\" clean --all:\n  c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory\n  compilation terminated.\n  Traceback (most recent call last):\n    File \"/usr/lib/python3.5/distutils/unixccompiler.py\", line 118, in _compile\n      extra_postargs)\n    File \"/usr/lib/python3.5/distutils/ccompiler.py\", line 909, in spawn\n      spawn(cmd, dry_run=self.dry_run)\n    File \"/usr/lib/python3.5/distutils/spawn.py\", line 36, in spawn\n      _spawn_posix(cmd, search_path, dry_run=dry_run)\n    File \"/usr/lib/python3.5/distutils/spawn.py\", line 159, in _spawn_posix\n      % (cmd, exit_status))\n  distutils.errors.DistutilsExecError: command 'x86_64-linux-gnu-gcc' failed with exit status 1\n  \n  During handling of the above exception, another exception occurred:\n  \n  Traceback (most recent call last):\n    File \"/usr/lib/python3.5/distutils/core.py\", line 148, in setup\n      dist.run_commands()\n    File \"/usr/lib/python3.5/distutils/dist.py\", line 955, in run_commands\n      self.run_command(cmd)\n    File \"/usr/lib/python3.5/distutils/dist.py\", line 974, in run_command\n      cmd_obj.run()\n    File \"/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py\", line 161, in run\n      cmd = self.call_command('install_lib', warn_dir=0)\n    File \"/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py\", line 147, in call_command\n      self.run_command(cmdname)\n    File \"/usr/lib/python3.5/distutils/cmd.py\", line 313, in run_command\n      self.distribution.run_command(command)\n    File \"/usr/lib/python3.5/distutils/dist.py\", line 974, in run_command\n      cmd_obj.run()\n    File \"/usr/lib/python3/dist-packages/setuptools/command/install_lib.py\", line 23, in run\n      self.build()\n    File \"/usr/lib/python3.5/distutils/command/install_lib.py\", line 109, in build\n      self.run_command('build_ext')\n    File \"/usr/lib/python3.5/distutils/cmd.py\", line 313, in run_command\n      self.distribution.run_command(command)\n    File \"/usr/lib/python3.5/distutils/dist.py\", line 974, in run_command\n      cmd_obj.run()\n    File \"/usr/lib/python3/dist-packages/setuptools/command/build_ext.py\", line 49, in run\n      _build_ext.run(self)\n    File \"/usr/lib/python3.5/distutils/command/build_ext.py\", line 338, in run\n      self.build_extensions()\n    File \"/usr/lib/python3.5/distutils/command/build_ext.py\", line 447, in build_extensions\n      self._build_extensions_serial()\n    File \"/usr/lib/python3.5/distutils/command/build_ext.py\", line 472, in _build_extensions_serial\n      self.build_extension(ext)\n    File \"/usr/lib/python3/dist-packages/setuptools/command/build_ext.py\", line 174, in build_extension\n      _build_ext.build_extension(self, ext)\n    File \"/usr/lib/python3.5/distutils/command/build_ext.py\", line 532, in build_extension\n      depends=ext.depends)\n    File \"/usr/lib/python3.5/distutils/ccompiler.py\", line 574, in compile\n      self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)\n    File \"/usr/lib/python3.5/distutils/unixccompiler.py\", line 120, in _compile\n      raise CompileError(msg)\n  distutils.errors.CompileError: command 'x86_64-linux-gnu-gcc' failed with exit status 1\n  \n  During handling of the above exception, another exception occurred:\n  \n  Traceback (most recent call last):\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 154, in save_modules\n      yield saved\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 195, in setup_context\n      yield\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 243, in run_setup\n      DirectorySandbox(setup_dir).run(runner)\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 273, in run\n      return func()\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 242, in runner\n      _execfile(setup_script, ns)\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 46, in _execfile\n      exec(code, globals, locals)\n    File \"/tmp/easy_install-czy2rmcm/cffi-1.11.5/setup.py\", line 240, in <module>\n      def run_tests(self):\n    File \"/usr/lib/python3.5/distutils/core.py\", line 163, in setup\n      raise SystemExit(\"error: \" + str(msg))\n  SystemExit: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1\n  \n  During handling of the above exception, another exception occurred:\n  \n  Traceback (most recent call last):\n    File \"/usr/lib/python3/dist-packages/setuptools/command/easy_install.py\", line 1087, in run_setup\n      run_setup(setup_script, args)\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 246, in run_setup\n      raise\n    File \"/usr/lib/python3.5/contextlib.py\", line 77, in __exit__\n      self.gen.throw(type, value, traceback)\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 195, in setup_context\n      yield\n    File \"/usr/lib/python3.5/contextlib.py\", line 77, in __exit__\n      self.gen.throw(type, value, traceback)\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 166, in save_modules\n      saved_exc.resume()\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 141, in resume\n      six.reraise(type, exc, self._tb)\n    File \"/usr/lib/python3/dist-packages/pkg_resources/_vendor/six.py\", line 685, in reraise\n      raise value.with_traceback(tb)\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 154, in save_modules\n      yield saved\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 195, in setup_context\n      yield\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 243, in run_setup\n      DirectorySandbox(setup_dir).run(runner)\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 273, in run\n      return func()\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 242, in runner\n      _execfile(setup_script, ns)\n    File \"/usr/lib/python3/dist-packages/setuptools/sandbox.py\", line 46, in _execfile\n      exec(code, globals, locals)\n    File \"/tmp/easy_install-czy2rmcm/cffi-1.11.5/setup.py\", line 240, in <module>\n      def run_tests(self):\n    File \"/usr/lib/python3.5/distutils/core.py\", line 163, in setup\n      raise SystemExit(\"error: \" + str(msg))\n  SystemExit: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1\n  \n  During handling of the above exception, another exception occurred:\n  \n  Traceback (most recent call last):\n    File \"<string>\", line 1, in <module>\n    File \"/tmp/pip-build-2jxl4vu7/cryptography/setup.py\", line 319, in <module>\n      **keywords_with_side_effects(sys.argv)\n    File \"/usr/lib/python3.5/distutils/core.py\", line 108, in setup\n      _setup_distribution = dist = klass(attrs)\n    File \"/usr/lib/python3/dist-packages/setuptools/dist.py\", line 269, in __init__\n      self.fetch_build_eggs(attrs['setup_requires'])\n    File \"/usr/lib/python3/dist-packages/setuptools/dist.py\", line 313, in fetch_build_eggs\n      replace_conflicting=True,\n    File \"/usr/lib/python3/dist-packages/pkg_resources/__init__.py\", line 826, in resolve\n      dist = best[req.key] = env.best_match(req, ws, installer)\n    File \"/usr/lib/python3/dist-packages/pkg_resources/__init__.py\", line 1092, in best_match\n      return self.obtain(req, installer)\n    File \"/usr/lib/python3/dist-packages/pkg_resources/__init__.py\", line 1104, in obtain\n      return installer(requirement)\n    File \"/usr/lib/python3/dist-packages/setuptools/dist.py\", line 380, in fetch_build_egg\n      return cmd.easy_install(req)\n    File \"/usr/lib/python3/dist-packages/setuptools/command/easy_install.py\", line 663, in easy_install\n      return self.install_item(spec, dist.location, tmpdir, deps)\n    File \"/usr/lib/python3/dist-packages/setuptools/command/easy_install.py\", line 693, in install_item\n      dists = self.install_eggs(spec, download, tmpdir)\n    File \"/usr/lib/python3/dist-packages/setuptools/command/easy_install.py\", line 873, in install_eggs\n      return self.build_and_install(setup_script, setup_base)\n    File \"/usr/lib/python3/dist-packages/setuptools/command/easy_install.py\", line 1101, in build_and_install\n      self.run_setup(setup_script, setup_base, args)\n    File \"/usr/lib/python3/dist-packages/setuptools/command/easy_install.py\", line 1089, in run_setup\n      raise DistutilsError(\"Setup script exited with %s\" % (v.args[0],))\n  distutils.errors.DistutilsError: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1\n  \n  ----------------------------------------\n  Running setup.py bdist_wheel for pycparser: started\n  Running setup.py bdist_wheel for pycparser: finished with status 'done'\n  Stored in directory: /root/.cache/pip/wheels/c0/a1/27/5ba234bd77ea5a290cbf6d675259ec52293193467a12ef1f46\nSuccessfully built pycparser\nFailed to build cryptography\nInstalling collected packages: pip, setuptools, idna, asn1crypto, six, pycparser, cffi, cryptography, pynacl, bcrypt, pyasn1, paramiko\n  Found existing installation: pip 8.1.1\n    Not uninstalling pip at /usr/lib/python3/dist-packages, outside environment /usr\n  Found existing installation: setuptools 20.7.0\n    Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr\n  Found existing installation: idna 2.0\n    Not uninstalling idna at /usr/lib/python3/dist-packages, outside environment /usr\n  Found existing installation: six 1.10.0\n    Not uninstalling six at /usr/lib/python3/dist-packages, outside environment /usr\n  Found existing installation: cryptography 1.2.3\n    Not uninstalling cryptography at /usr/lib/python3/dist-packages, outside environment /usr\n  Running setup.py install for cryptography: started\n    Running setup.py install for cryptography: finished with status 'error'\n    Complete output from command /usr/bin/python3 -u -c \"import setuptools, tokenize;__file__='/tmp/pip-build-2jxl4vu7/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))\" install --record /tmp/pip-vx2l1vkt-record/install-record.txt --single-version-externally-managed --compile:\n    running install\n    running build\n    running build_py\n    creating build\n    creating build/lib.linux-x86_64-3.5\n    creating build/lib.linux-x86_64-3.5/cryptography\n    copying src/cryptography/fernet.py -> build/lib.linux-x86_64-3.5/cryptography\n    copying src/cryptography/utils.py -> build/lib.linux-x86_64-3.5/cryptography\n    copying src/cryptography/__about__.py -> build/lib.linux-x86_64-3.5/cryptography\n    copying src/cryptography/exceptions.py -> build/lib.linux-x86_64-3.5/cryptography\n    copying src/cryptography/__init__.py -> build/lib.linux-x86_64-3.5/cryptography\n    creating build/lib.linux-x86_64-3.5/cryptography/hazmat\n    copying src/cryptography/hazmat/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat\n    creating build/lib.linux-x86_64-3.5/cryptography/x509\n    copying src/cryptography/x509/general_name.py -> build/lib.linux-x86_64-3.5/cryptography/x509\n    copying src/cryptography/x509/certificate_transparency.py -> build/lib.linux-x86_64-3.5/cryptography/x509\n    copying src/cryptography/x509/oid.py -> build/lib.linux-x86_64-3.5/cryptography/x509\n    copying src/cryptography/x509/extensions.py -> build/lib.linux-x86_64-3.5/cryptography/x509\n    copying src/cryptography/x509/base.py -> build/lib.linux-x86_64-3.5/cryptography/x509\n    copying src/cryptography/x509/name.py -> build/lib.linux-x86_64-3.5/cryptography/x509\n    copying src/cryptography/x509/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/x509\n    creating build/lib.linux-x86_64-3.5/cryptography/hazmat/backends\n    copying src/cryptography/hazmat/backends/interfaces.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends\n    copying src/cryptography/hazmat/backends/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends\n    creating build/lib.linux-x86_64-3.5/cryptography/hazmat/bindings\n    copying src/cryptography/hazmat/bindings/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/bindings\n    creating build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives\n    copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives\n    copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives\n    copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives\n    copying src/cryptography/hazmat/primitives/padding.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives\n    copying src/cryptography/hazmat/primitives/serialization.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives\n    copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives\n    copying src/cryptography/hazmat/primitives/mac.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives\n    copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives\n    copying src/cryptography/hazmat/primitives/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives\n    creating build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl\n    copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl\n    copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl\n    copying src/cryptography/hazmat/backends/openssl/dh.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl\n    copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl\n    copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl\n    copying src/cryptography/hazmat/backends/openssl/x25519.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl\n    copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl\n    copying src/cryptography/hazmat/backends/openssl/aead.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl\n    copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl\n    copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl\n    copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl\n    copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl\n    copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl\n    copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl\n    copying src/cryptography/hazmat/backends/openssl/encode_asn1.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl\n    copying src/cryptography/hazmat/backends/openssl/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/backends/openssl\n    creating build/lib.linux-x86_64-3.5/cryptography/hazmat/bindings/openssl\n    copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/bindings/openssl\n    copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/bindings/openssl\n    copying src/cryptography/hazmat/bindings/openssl/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/bindings/openssl\n    creating build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/asymmetric\n    copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/asymmetric\n    copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/asymmetric\n    copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/asymmetric\n    copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/asymmetric\n    copying src/cryptography/hazmat/primitives/asymmetric/x25519.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/asymmetric\n    copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/asymmetric\n    copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/asymmetric\n    copying src/cryptography/hazmat/primitives/asymmetric/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/asymmetric\n    creating build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/twofactor\n    copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/twofactor\n    copying src/cryptography/hazmat/primitives/twofactor/utils.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/twofactor\n    copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/twofactor\n    copying src/cryptography/hazmat/primitives/twofactor/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/twofactor\n    creating build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/kdf\n    copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/kdf\n    copying src/cryptography/hazmat/primitives/kdf/scrypt.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/kdf\n    copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/kdf\n    copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/kdf\n    copying src/cryptography/hazmat/primitives/kdf/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/kdf\n    copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/kdf\n    copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/kdf\n    creating build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/ciphers\n    copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/ciphers\n    copying src/cryptography/hazmat/primitives/ciphers/aead.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/ciphers\n    copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/ciphers\n    copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/ciphers\n    copying src/cryptography/hazmat/primitives/ciphers/__init__.py -> build/lib.linux-x86_64-3.5/cryptography/hazmat/primitives/ciphers\n    running egg_info\n    writing dependency_links to src/cryptography.egg-info/dependency_links.txt\n    writing src/cryptography.egg-info/PKG-INFO\n    writing top-level names to src/cryptography.egg-info/top_level.txt\n    writing requirements to src/cryptography.egg-info/requires.txt\n    reading manifest file 'src/cryptography.egg-info/SOURCES.txt'\n    reading manifest template 'MANIFEST.in'\n    no previously-included directories found matching 'docs/_build'\n    warning: no previously-included files matching '*' found under directory 'vectors'\n    writing manifest file 'src/cryptography.egg-info/SOURCES.txt'\n    running build_ext\n    generating cffi module 'build/temp.linux-x86_64-3.5/_padding.c'\n    creating build/temp.linux-x86_64-3.5\n    generating cffi module 'build/temp.linux-x86_64-3.5/_constant_time.c'\n    generating cffi module 'build/temp.linux-x86_64-3.5/_openssl.c'\n    building '_openssl' extension\n    creating build/temp.linux-x86_64-3.5/build\n    creating build/temp.linux-x86_64-3.5/build/temp.linux-x86_64-3.5\n    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c build/temp.linux-x86_64-3.5/_openssl.c -o build/temp.linux-x86_64-3.5/build/temp.linux-x86_64-3.5/_openssl.o -Wconversion -Wno-error=sign-conversion\n    build/temp.linux-x86_64-3.5/_openssl.c:493:30: fatal error: openssl/opensslv.h: No such file or directory\n    compilation terminated.\n    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1\n    \n    ----------------------------------------\n\n:stderr:   Failed building wheel for cryptography\n  Failed cleaning build dir for cryptography\n  Can't rollback cryptography, nothing uninstalled.\nCommand \"/usr/bin/python3 -u -c \"import setuptools, tokenize;__file__='/tmp/pip-build-2jxl4vu7/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))\" install --record /tmp/pip-vx2l1vkt-record/install-record.txt --single-version-externally-managed --compile\" failed with error code 1 in /tmp/pip-build-2jxl4vu7/cryptography/\n"}

This "failure" stops the Ansible script from progressing. But when you run ./setup-requirements again, it obviously succeeded.

PLAY [install ubuntu1 node as ansible control machine] *********************************************

TASK [Gathering Facts] *****************************************************************************
ok: [ubuntu1]

TASK [apt] *****************************************************************************************
ok: [ubuntu1]

TASK [pip] *****************************************************************************************
changed: [ubuntu1]

TASK [pip] *****************************************************************************************
changed: [ubuntu1]

TASK [git] *****************************************************************************************
changed: [ubuntu1]

TASK [user] ****************************************************************************************
changed: [ubuntu1]

FreeBSD Bugs

I think the ansible playbook fails when pkg upgrade --dry-run comes back with updates, rather than move along. A --dry-run isn't actually doing anything so I don't think it should fail.


x-post: https://github.com/stationgroup/ansible-experiments/pull/3 https://github.com/stationgroup/ansible-experiments/issues/4 https://github.com/stationgroup/ansible-experiments/issues/1 https://github.com/stationgroup/ansible-experiments/pull/5

reelsense commented 6 years ago

Will test and work on this again Monday.

reelsense commented 6 years ago

I think the FreeBSD os_upgrade.yml bugs are fixed. https://github.com/stationgroup/ansible-experiments/issues/7

Fix for #7

I think freebsd-update returns failed even when "No updates needed" or "No update are available". freebsd/pkg#1470

 failed_when: False # --dry-run always returns failure
                   # freebsd/pkg#1470