Link to home
Start Free TrialLog in
Avatar of NAMEWITHELD12
NAMEWITHELD12Flag for United States of America

asked on

ansible error AttributeError: 'Task' object has no attribute 'async_val' WTF does this mean ??? I have not a clue as I am new to ansible

I am having an issue with my Ansilbe script running  and have no idea what this error means , can some one send  me in the right direction ?

task path: /home/ec2-user/Projects/ocp-automation/RHEL-preconfig-playbook.yml:43
The full traceback is:
Traceback (most recent call last):
 File "/usr/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 130, in run
   res = self._execute()
 File "/usr/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 528, in _execute
   result = self._handler.run(task_vars=variables)
 File "/usr/lib/python2.7/site-packages/ansible/plugins/action/command.py", line 23, in run
   wrap_async = self._task.async_val and not self._connection.has_native_async
AttributeError: 'Task' object has no attribute 'async_val'

fatal: [ec2-34-xxx-9-221.compute-1.amazonaws.com]: FAILED! => {}
ASKER CERTIFIED SOLUTION
Avatar of Darrell Porter
Darrell Porter
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NAMEWITHELD12

ASKER

thanks for the info! I do really appreciate the help , let me give you some background on this , this is running from an ansible playbook and is failing on the task named "get repolist"

- name: get repolist
        shell: subscription-manager repos --list-enabled| awk '/^Repo ID:/{print $3}'
        register: currentrepos
        become: False


if I manually run "subscription-manager repos --list-enabled| awk '/^Repo ID:/{print $3}'" it will succeed and display what it is supposed to

I am not sure of the function of the "register: currentrepos"


the way I got the initial errors is by running the playbook with the -vvv option

is there a way to test this maybe with just running this with just a single host in the inventory file to prevent python from multi-threading some how ,

thanks again !
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I took the weekend off , we will be resuming this issue today  and will have more info


thanks for the help , I think you are sending us in the right direction !
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
not really , we have opened a ticket with red hat on it , I will update you soon !

thanks
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
yeah we had a hell of a time , had to open a ticket with red hat , I am not to clear on how we got it to work
I will post what I know in a bit
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
are you doing this with an AWS AMI ?, some of the issue seemed to be from installing ansible and them creating and custom ami from it
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial