[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Ansible - permission denied gathering facts



Just figured out I'd created dir /etc/ansible/facts.d/openshift.fact when that should be the path name for the fact file.
Took me only 24h!

Anyway, I believe the error message is misleading:

$ mkdir mydir && echo > mydir
bash: mydir: Is a directory

That is something I expect to see when a file is being created on a dir with same name.


--
Mateus Caruccio / Master of Puppets
GetupCloud.com 
We make the infrastructure invisible
Gartner Cool Vendor 2017

2017-09-12 15:47 GMT-03:00 Mateus Caruccio <mateus caruccio getupcloud com>:
Hello.

I'm running openshift-ansible and hit on a permission denied error during fact gathering of playbook "Evaluate node groups"

It doesn't matter if it runs as regular (getup) or root user.
Both user have ssh {getup,root} localhost access using private keys and sudo without password.
I even tried to chmod -R 777 /etc/ansible in oder to run as regular user, but no success.

Any directions? Am I missing something?

This is the latest and only error:

$ ansible-playbook -i ./hosts getup.yaml
PLAY [Evaluate node groups] ****************************************************************************************************************************************************

TASK [Gathering Facts] *********************************************************************************************************************************************************
Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/setup.py
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: getup
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python2 && sleep 0'
fatal: [localhost]: FAILED! => {
    "changed": false,
    "cmd": "/etc/ansible/facts.d/openshift.fact",
    "failed": true,
    "invocation": {
        "module_args": {
            "fact_path": "/etc/ansible/facts.d",
            "filter": "*",
            "gather_subset": [
                "all"
            ],
            "gather_timeout": 10
        }
    },
    "msg": "[Errno 13] Permission denied",
    "rc": 13
}

$ cat getup.yaml
---
- include: /usr/share/ansible/openshift-ansible/playbooks/byo/config.yml
  vars:
    openshift_node_local_quota_per_fsgroup: 1Gi
    deployment_type: origin
    containerized: false

$ ansible --version
ansible 2.3.2.0
  config file = /home/getup/getup-engine/ansible/ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.5 (default, Nov  6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]

$ cat /home/getup/getup-engine/ansible/ansible.cfg
# config file for ansible -- http://ansible.com/
# ==============================================
[defaults]
#callback_plugins = ../openshift-ansible/ansible-profile/callback_plugins
forks = 50
host_key_checking = False
#hostfile = ~centos/hosts
roles_path = /usr/share/ansible/openshift-ansible/roles:/opt/ansible/roles:./roles:../../roles:
remote_user = getup
gathering = smart
retry_files_enabled = false
nocows = true
#lookup_plugins = ./playbooks/lookup_plugins
#log_path = /tmp/ansible.log

[privilege_escalation]
become = True

[ssh_connection]
ssh_args = -o RequestTTY=yes -o ControlMaster=auto -o ControlPersist=900s -o GSSAPIAuthentication=no
control_path = /var/tmp/%%h-%%r
pipelining = True

$ cd /usr/share/ansible/openshift-ansible
$ git branch -v
  master      4acdef4 Merge pull request #5340 from sdodson/bz1489913
* release-3.6 d53c565 Automatic commit of package [openshift-ansible] release [3.6.173.0.32-1].


--
Mateus Caruccio / Master of Puppets
GetupCloud.com 
We make the infrastructure invisible
Gartner Cool Vendor 2017


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]