gocd-contrib / ansible-gocd

Ansible playbook to install ThoughtWorks open-source continuous delivery tool, Go. Also available on Ansible Galaxy https://galaxy.ansible.com/list#/roles/1690
http://www.go.cd/
MIT License
70 stars 57 forks source link

Destination /usr/share/go-server not writable #39

Open aloysius-lim opened 8 years ago

aloysius-lim commented 8 years ago

When using the server role, the following output is produced:

TASK [tpbrown.gocd/roles/server : create script for automated Go configuration backups to Git] ***
fatal: [gocd_server]: FAILED! => {"changed": true, "failed": true, "msg": "Destination /usr/share/go-server not writable"}

Here is the playbook:

- hosts: gocd_server
  roles:
    - tpbrown.gocd/roles/common
    - tpbrown.gocd/roles/server

A simple fix would be to add sudo: yes to this step:

# roles/server/tasks/go-server.yml
- name: create script for automated Go configuration backups to Git
  sudo: yes
  template: backup=no dest=/usr/share/go-server/ mode=0755 src=backup_to_git.sh
johnmckinzie commented 8 years ago

@aloysius-lim I tried making the change you suggest (sudo is now become, by they way) and I'm still getting the same error. Did it work when you made the change?

aloysius-lim commented 8 years ago

It worked for me. You might want to check whether the SSH user that you're logging into the target host with has sudo permissions