Update: 

Figured out an error. 

I was initially getting error of packaging module missing : module_failure 
for another Ansible module that installs azure VM.


TASK [azure_rm_virtualnetwork] 
*********************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use 
-vvv. The error was: ImportError: No module named packaging.version
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": 
"Traceback (most recent call last):\n  File 
\"/var/folders/tx/v8mw27js4vn1rzwr53dxf1y40000gn/T/ansible_Z_Z8rL/ansible_module_azure_rm_virtualnetwork.py\",
 
line 137, in <module>\n    from ansible.module_utils.azure_rm_common import 
AzureRMModuleBase, CIDR_PATTERN\n  File 
\"/var/folders/tx/v8mw27js4vn1rzwr53dxf1y40000gn/T/ansible_Z_Z8rL/ansible_modlib.zip/ansible/module_utils/azure_rm_common.py\",
 
line 28, in <module>\nImportError: No module named packaging.version\n", 
"module_stdout": "", "msg": "MODULE FAILURE", "rc": 0}

To solve it, I pip installed packaging package and update ansible.cfg to 
point to the dir where packaging is installed by appending that dir to 

library=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

turns out that Ansible installs its own version of python and keeps its own 
version of site-packages. So I pip installed the package locally into 
Ansible's verison of python site-packages. 

Any better approach than this to solve this python dependency issues?

Thanks
Vishlesh
On Monday, March 5, 2018 at 5:40:45 PM UTC-5, Vishlesh Patel wrote:
>
> - hosts: CSRs
>  gather_facts: false
>  connection: local
>
>   tasks:
>   - name: test show run
>     ios_config:
>       authorize: yes
>       lines:
>         - do show run
>
>
> I have the above simple show_run.yaml ansible playbook. While i run this 
> playbook I am getting this error:
> ~/central-orchestration/csr-instance-ansible-poc > ansible-playbook 
> show_run.yaml
> ERROR! conflicting action statements: ios_config, name
>
> The error appears to have been in 
> '/Users/vishlpa4/central-orchestration/csr-instance-ansible-poc/show_run.yaml':
>  
> line 6, column 6, but may
> be elsewhere in the file depending on the exact syntax problem.
>
> The offending line appears to be:
>
>   tasks:
>    - name: test show run
>      ^ here
>
>
> The error appears to have been in 
> '/Users/vishlpa4/central-orchestration/csr-instance-ansible-poc/show_run.yaml':
>  
> line 6, column 6, but may
> be elsewhere in the file depending on the exact syntax problem.
>
> The offending line appears to be:
>
>   tasks:
>    - name: test show run
>      ^ here
>
> exception type: <class 'ansible.errors.AnsibleParserError'>
> exception: conflicting action statements: ios_config, name
>
> The error appears to have been in 
> '/Users/vishlpa4/central-orchestration/csr-instance-ansible-poc/show_run.yaml':
>  
> line 6, column 6, but may
> be elsewhere in the file depending on the exact syntax problem.
>
> The offending line appears to be:
>
>   tasks:
>    - name: test show run
>      ^ here
>
> ~/central-orchestration/csr-instance-ansible-poc >
>
>
>
>
> Am I missing something here ?
>
>
> Thanks
> Vishlesh
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/70906776-4d3e-47fc-b55c-329f24497d74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to