apigee / devportal-kickstart-drupal-ansible-installer

Ansible playbook for installing Apigee Kickstart developer portal for Drupal.
Apache License 2.0
5 stars 6 forks source link

unable to install this playbook remote #9

Open huntertj opened 4 years ago

huntertj commented 4 years ago

Description

Unable to install from a remote ansible server

Steps to Reproduce

on a separate server install ansible, clone this repo, edit the hosts.yml to connect to a newly provisioned centos server and attempt to run ansible-playbook playbook.yaml as a user other then root

Actual Behavior

Errors related to permissions

Expected Behavior

Expected to complete ansible playbook

cnovak commented 4 years ago

The scripts need to be able to use sudo to run many of the commands such as yum. Can you share details on the error you are getting?

huntertj commented 4 years ago

as an example my hosts.yaml, vagrant has sudo permissions

all:
  children:
    webservers:
      hosts:
        localhost:
          ansible_host: 192.168.6.65
          ansible_user: vagrant
          ansible_password: vagrant
    dbservers:
      hosts:
        localhost:
          ansible_host: 192.168.6.65
          ansible_user: vagrant
          ansible_password: vagrant

first error is here

TASK [geerlingguy.drupal : Ensure drupal_deploy_dir directory exists.] ***********************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: PermissionError: [Errno 1] Operation not permitted: b'/opt/devportal'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Shared connection to 192.168.6.65 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/home/vagrant/.ansible/tmp/ansible-tmp-1603589357.4949398-432127-236695135311935/AnsiballZ_file.py\", line 102, in <module>\r\n    _ansiballz_main()\r\n  File \"/home/vagrant/.ansible/tmp/ansible-tmp-1603589357.4949398-432127-236695135311935/AnsiballZ_file.py\", line 94, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/home/vagrant/.ansible/tmp/ansible-tmp-1603589357.4949398-432127-236695135311935/AnsiballZ_file.py\", line 40, in invoke_module\r\n    runpy.run_module(mod_name='ansible.modules.files.file', init_globals=None, run_name='__main__', alter_sys=True)\r\n  File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\r\n    return _run_module_code(code, init_globals, run_name, mod_spec)\r\n  File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\r\n    mod_name, mod_spec, pkg_name, script_name)\r\n  File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/tmp/ansible_file_payload__pg4qjkd/ansible_file_payload.zip/ansible/modules/files/file.py\", line 940, in <module>\r\n  File \"/tmp/ansible_file_payload__pg4qjkd/ansible_file_payload.zip/ansible/modules/files/file.py\", line 926, in main\r\n  File \"/tmp/ansible_file_payload__pg4qjkd/ansible_file_payload.zip/ansible/modules/files/file.py\", line 662, in ensure_directory\r\n  File \"/tmp/ansible_file_payload__pg4qjkd/ansible_file_payload.zip/ansible/module_utils/basic.py\", line 1435, in set_fs_attributes_if_different\r\n  File \"/tmp/ansible_file_payload__pg4qjkd/ansible_file_payload.zip/ansible/module_utils/basic.py\", line 1202, in set_mode_if_different\r\nPermissionError: [Errno 1] Operation not permitted: b'/opt/devportal'\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}