daily pastebin goal
61%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 91 in 9 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Dynamic inventory script 1:
  2.  
  3. #!/bin/bash
  4. CURRENT_DIR=$(pwd)
  5. echo "$CURRENT_DIR"
  6.  
  7. Output from tower inventory sync job 1:
  8.  
  9.     3.157 INFO     Updating inventory 7: Dynamic Inventory Attempt
  10.     3.191 INFO     Reading Ansible inventory source: /tmp/awx_inventory_t95DKD/tmpVn4ZZz
  11. Traceback (most recent call last):
  12.   File "/usr/bin/awx-manage", line 9, in <module>
  13.     load_entry_point('awx==3.2.1', 'console_scripts', 'awx-manage')()
  14.   File "/lib/python2.7/site-packages/awx/__init__.py", line 107, in manage
  15.   File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
  16.     utility.execute()
  17.   File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/management/__init__.py", line 346, in execute
  18.     self.fetch_command(subcommand).run_from_argv(self.argv)
  19.   File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv
  20.     self.execute(*args, **cmd_options)
  21.   File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute
  22.     output = self.handle(*args, **options)
  23.   File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/management/base.py", line 661, in handle
  24.     return self.handle_noargs(**options)
  25.   File "/lib/python2.7/site-packages/awx/main/management/commands/inventory_import.py", line 1000, in handle_noargs
  26.   File "/lib/python2.7/site-packages/awx/main/management/commands/inventory_import.py", line 243, in load_inventory_source
  27.   File "/lib/python2.7/site-packages/awx/main/management/commands/inventory_import.py", line 179, in load
  28.   File "/lib/python2.7/site-packages/awx/main/management/commands/inventory_import.py", line 163, in command_to_json
  29. RuntimeError: ansible-inventory failed (rc=4) with stdout:
  30.  
  31. stderr:
  32. ERROR! Could not parse inventory source /tmp/awx_inventory_t95DKD/tmpVn4ZZz with available plugins:
  33. Plugin script failed: local variable 'err' referenced before assignment
  34. Plugin yaml failed: YAML inventory has invalid structure, it should be a dictionary, got: <class 'ansible.parsing.yaml.objects.AnsibleUnicode'>
  35. Plugin ini failed: /tmp/awx_inventory_t95DKD/tmpVn4ZZz:3: Expected key=value host variable assignment, got: $CURRENT_DIR
  36.  
  37. Dynamic inventory script 2:
  38.  
  39. #!/bin/bash
  40. git clone ssh://git@192.168.123.45:7999/project/inventory.git
  41.  
  42. Output from tower inventory sync job 2:
  43.  
  44.     3.077 INFO     Updating inventory 8: Dynamic Inventory Attempt 2
  45.     3.109 INFO     Reading Ansible inventory source: /tmp/awx_inventory_azJvXL/tmpEO9KWA
  46. Traceback (most recent call last):
  47.   File "/usr/bin/awx-manage", line 9, in <module>
  48.     load_entry_point('awx==3.2.1', 'console_scripts', 'awx-manage')()
  49.   File "/lib/python2.7/site-packages/awx/__init__.py", line 107, in manage
  50.   File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
  51.     utility.execute()
  52.   File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/management/__init__.py", line 346, in execute
  53.     self.fetch_command(subcommand).run_from_argv(self.argv)
  54.   File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv
  55.     self.execute(*args, **cmd_options)
  56.   File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute
  57.     output = self.handle(*args, **options)
  58.   File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/management/base.py", line 661, in handle
  59.     return self.handle_noargs(**options)
  60.   File "/lib/python2.7/site-packages/awx/main/management/commands/inventory_import.py", line 1000, in handle_noargs
  61.   File "/lib/python2.7/site-packages/awx/main/management/commands/inventory_import.py", line 243, in load_inventory_source
  62.   File "/lib/python2.7/site-packages/awx/main/management/commands/inventory_import.py", line 179, in load
  63.   File "/lib/python2.7/site-packages/awx/main/management/commands/inventory_import.py", line 163, in command_to_json
  64. RuntimeError: ansible-inventory failed (rc=4) with stdout:
  65.  
  66. stderr:
  67. ERROR! Could not parse inventory source /tmp/awx_inventory_azJvXL/tmpEO9KWA with available plugins:
  68. Plugin script failed: Inventory script (/tmp/awx_inventory_azJvXL/tmpEO9KWA) had an execution error: fatal: could not create work tree dir 'inventory'.: Permission denied
RAW Paste Data
Top