# BUG?  'AnsibleSequence' object has no attribute 'strip'

**URL:** <https://forum.ansible.com/t/bug-ansiblesequence-object-has-no-attribute-strip/26727>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [February 14, 2018, 5:53am UTC](https://forum.ansible.com/t/bug-ansiblesequence-object-has-no-attribute-strip/26727 "2018-02-14T05:53:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [February 14, 2018, 5:53am UTC](https://forum.ansible.com/t/bug-ansiblesequence-object-has-no-attribute-strip/26727/1 "2018-02-14T05:53:16Z")

</div>

> I don't know if I have a syntax issue or a bug. Thought before filing a  
> bug I would see what you guys thought. I have a bunch of roles/playbooks I  
> wish to execute against new servers. Here is what I have come up with.  
> ansible-2.4.3.0-1.el7.ans.noarch
> 
> Playbook:  
> ---  
> - hosts: "{{ host }}"
> 
> &nbsp;&nbsp;roles:  
> &nbsp;&nbsp;&nbsp;&nbsp;- ansible\_dependencies  
> &nbsp;&nbsp;&nbsp;&nbsp;- aliases

\<snip /\>

> &nbsp;&nbsp;import\_playbook:  
> &nbsp;&nbsp;&nbsp;&nbsp;- /playbooks/one-offs/bash\_history.yml -e host= "{{ host }}"  
> &nbsp;&nbsp;&nbsp;&nbsp;- /playbooks/one-offs/dmesg\_timestamps.yml -e host= "{{ host }}"  
> &nbsp;&nbsp;&nbsp;&nbsp;- /playbooks/one-offs/grub\_cmdline.yml -e host= "{{ host }}"

import\_playbook is not a directive for a play, since it's a file with one or more play it's a directive on the top level.  
So you need a dash in front and move it all the way to the left.

import\_playbook doesn't take a list of playbook files, a little hint is that it's \_playbook not \_playbooks.

-e is misplaced, -e is a command line option so remove that.

It's not allowed to have space in-front or after the equal sign in Ansible yaml syntax.

So try

- import\_playbook: /playbooks/one-offs/bash\_history.yml host="{{ host }}"  
- import\_playbook: /playbooks/one-offs/dmesg\_timestamps.yml host="{{ host }}"  
...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [February 15, 2018, 1:28am UTC](https://forum.ansible.com/t/bug-ansiblesequence-object-has-no-attribute-strip/26727/2 "2018-02-15T01:28:45Z")

</div>

Actually, you should write it like this:

- import\_playbook: /playbooks/one-offs/bash\_history.yml  
&nbsp;&nbsp;vars:  
&nbsp;&nbsp;&nbsp;&nbsp;host: "{{ host }}"

- import\_playbook: /playbooks/one-offs/dmesg\_timestamps.yml  
&nbsp;&nbsp;vars:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;host: "{{ host }}"
