my playbooks have broke since 1.9. Sudo issues it seems

383 views
Skip to first unread message

Benjamin Copeland

unread,
Mar 31, 2015, 8:22:56 AM3/31/15
to ansible...@googlegroups.com
Hi all,

So, since 1.9.0.1-1 my playbooks have broken. 

My playbook:

  roles:
   - role: common
     sudo: yes


IOError: [Errno 13] Permission denied: '/etc/fstab'
OpenSSH_6.8p1, OpenSSL 1.0.2a 19 Mar 2015

The fix:

Add sudo: yes to the task:

cat roles/common/tasks/main.yml 
---
- name: Ensure fstab uses nobootwait and noatime
  mount:
    name: "{{ item.mount }}"
    src: "{{ item.device }}"
    fstype: "{{ item.fstype }}"
    opts: "{{ item.options.split(',') | union(['nobootwait','noatime']) | join(',') }}"
    state: present
  with_items: ansible_mounts
  when: item.options.find("nobootwait") == -1 or item.options.find("noatime") == -1
  tags:
    - fstab
  sudo: yes


If I role back to 1.8.4-1 all is okay. 

I have looked at the changelog, but cannot see anything thats changed.

Am I doing something wrong?

Ben

Brian Coca

unread,
Mar 31, 2015, 8:39:17 AM3/31/15
to ansible...@googlegroups.com
this should be fixed in current devel, roles and includes were not
passing sudo parameters to their tasks.



--
Brian Coca

Benjamin Copeland

unread,
Mar 31, 2015, 9:37:17 AM3/31/15
to ansible...@googlegroups.com
Okay thanks Brain. Was a bug introduced? 

I am running version from Arch Linux (https://www.archlinux.org/packages/community/any/ansible/

Two options:

- Role back to to 1.8.4 (sudo pacman -U /var/cache/pacman/pkg/ansible-1.8.4-1-any.pkg.tar.xz)
- Or install devel.

Benjamin Copeland

unread,
Mar 31, 2015, 9:39:39 AM3/31/15
to ansible...@googlegroups.com
Just FYI:

Added IgnorePkg=ansible into my pacman.conf and rolled back to 1.8.4.

Toshio Kuratomi

unread,
Mar 31, 2015, 9:43:15 AM3/31/15
to ansible...@googlegroups.com

Third option if you need it is to run the stable-1.9 branch.  That is what we'll be cutting the 1.9.1 (and other future, 1.9 releases) from.

-Toshio

--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/947cc430-d907-4ddd-b133-c9fe58158859%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brian Coca

unread,
Mar 31, 2015, 9:43:46 AM3/31/15
to ansible...@googlegroups.com
It was an 'unknown feature' but we decided to support it so it is a
bug, we will be releasing fix in 1.9.1 soon.


--
Brian Coca

Benjamin Copeland

unread,
Mar 31, 2015, 9:59:09 AM3/31/15
to ansible...@googlegroups.com
Ah okay. Thanks. 


I will just use 1.8.4 for now, and will upgrade to 1.9.1 when its released. 

Thanks for all your efforts Brain, you do a great job

Ben

Michel Blanc

unread,
Mar 31, 2015, 12:22:50 PM3/31/15
to ansible...@googlegroups.com
On 31/03/2015 15:37, Benjamin Copeland wrote:
> Okay thanks Brain. Was a bug introduced?
>
> I am running version from Arch Linux
> (https://www.archlinux.org/packages/community/any/ansible/)
>
> Two options:
>
> - Role back to to 1.8.4 (sudo pacman -U
> /var/cache/pacman/pkg/ansible-1.8.4-1-any.pkg.tar.xz)
> - Or install devel.

Hi,

You have devel provided in AUR already if it can help:

https://aur.archlinux.org/packages/ansible-git/

Cheers,

M
--
Michel Blanc
{ :github => "@leucos", :twitter => "@b9m", :gpg => "0X24B35C22" }

Adam Kalnas

unread,
May 4, 2015, 3:06:04 PM5/4/15
to ansible...@googlegroups.com, m...@mbnet.fr
Seems like this is still an issue on 1.9.1.  Test it this morning that the workaround is still needed.

Brian Coca

unread,
May 4, 2015, 3:07:41 PM5/4/15
to ansible...@googlegroups.com, m...@mbnet.fr
@adam, I cannot reproduce the original problem anymore, can you give
an example in which this fails?


--
Brian Coca
Reply all
Reply to author
Forward
0 new messages