"attr: i" failing on cent/rhel/oel6 -- why?

220 views
Skip to first unread message

John Harmon

unread,
Sep 5, 2017, 11:47:46 AM9/5/17
to Ansible Project
I am setting the immutable flag on a file (using template module).  It sets the immutable flag fine on cent/rhel7, but on cent/rhel/oel6 it complains.  I can set it manually on the *6 boxes just fine.  Wondering why you think this may be failing.  Seems like a bug with ansible to me:

ok: [ansibletest-rhel7]
fatal
: [ansibletest-rhel6]: FAILED! =>
{"changed": false, "details": "Error while setting attributes:
/usr/bin/chattr: Clearing extent flag not supported on
/etc/resolv.conf\n"
, "failed": true, "gid": 0, "group": "root", "mode":
"0644", "msg": "chattr failed", "owner": "root", "path":
"/etc/resolv.conf", "size": 90, "state": "file", "uid": 0}
...ignoring
fatal
:
 
[ansibletest-oel6]: FAILED! => {"changed": false, "details": "Error
while setting attributes: /etc/resolv.conf: Operation not supported\n"
,
"failed": true, "gid": 0, "group": "root", "mode": "0644", "msg":
"chattr failed", "owner": "root", "path": "/etc/resolv.conf", "size":
90, "state": "file", "uid": 0}
...ignoring
ok
: [cent7]
fatal
:
[rhel6]: FAILED! => {"changed": false, "details": "Error while
setting attributes: /usr/bin/chattr: Clearing extent flag not supported
on /etc/resolv.conf\n"
, "failed": true, "gid": 0, "group": "root",
"mode": "0644", "msg": "chattr failed", "owner": "root", "path":
"/etc/resolv.conf", "secontext": "system_u:object_r:net_conf_t:s0",
"size": 90, "state": "file", "uid": 0}
...ignoring



Dick Visser

unread,
Sep 6, 2017, 11:02:04 AM9/6/17
to ansible...@googlegroups.com
Could it be SELinux related?
> --
> 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/2ff4dea5-113d-4818-a406-ff8ea833c695%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Dick Visser
GÉANT

Want to join us? We're hiring: https://www.geant.org/jobs

John Harmon

unread,
Sep 6, 2017, 11:15:06 AM9/6/17
to Ansible Project
selinux isn't enabled 
Reply all
Reply to author
Forward
0 new messages