Closed bamachrn closed 4 years ago
Don't use --become command line switch, don't use --become-method=sudo on command line either. Set those variables in the OSEv3 group_vars in your inventory.
Most likely, you have having a $PATH problem on your remote hosts. Some people don't have /sbin in $PATH when using sudo, and that breaks all kinds of things, don't do this.
@michaelgugino thanks for the pointer. We modified our hosts file to look like below:
[OSEv3:vars]
# SSH user, this user should allow ssh based auth without requiring a password
ansible_ssh_user=dharmit
ansible_become=yes
However, the error persists.
We then checked the $PATH
:
$ echo $PATH
/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/dharmit/.local/bin:/home/dharmit/bin
$ which restorecon
/usr/sbin/restorecon
As reported earlier, manually running the command worked just fine. So we changed restorecon
to /usr/sbin/restorecon
and that worked. But as you see from above output, /usr/sbin
is already in $PATH
. I checked for sudo echo $PATH
just to be sure and it's there as well.
- name: Fix SELinux Permissions on /var/lib/containers
command: "/usr/sbin/restorecon -R /var/lib/containers/"
changed_when: false
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten /remove-lifecycle stale
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting /reopen
.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Exclude this issue from closing again by commenting /lifecycle frozen
.
/close
@openshift-bot: Closing this issue.
Description
We are using openshift-ansible 3.9 RPM from centos paas sig for installing openshift origin cluster 3.9. It has got two nodes
both has se-selinux permissive, iptables set to allow all the communication between those nodes.
OSEv3:vars
when we run:
it fails with
even though playbook shows the previous task as
to ensure /var/lib/containers exists
and works without error. And trying to run the command manually works just fine on those nodes.We have tried with with updating, downgrading the ansible versions nothing changes.
Now, when I update the task to
ignore_erros: true
prerequisites.yml works fine. But similar errors shows up while running the deploy_cluster.yml with some other file.Version
Steps To Reproduce
Setting up ansible controller node
Setting all the nodes for cluster setup using this playbook
Running
Expected Results
Observed Results