Ask Your Question

Get Google Drive permissions for Insync

asked 2015-09-25 09:25:15 -0600

T4ng10r gravatar image

Hi, My manifest prepares and installs Insync (commercial Google Drive client). Next step is authorizing client by using Authorization Code during command line account creation. It looks

  } ->
  package{"insync" : 
          ensure => installed, 
          require => Exec['apt_update'],
  } ->
  exec {'insync_start' :
    command => '/usr/bin/insync-headless start',
  } ->
  exec {'insync_pause' :
    command => '/usr/bin/insync-headless pause_syncing'
  } ->
  exec {'insync_new_account' :
    command => "/usr/bin/insync-headless add_account ${insync_auth_code} ${$insync_dest_dir}"

Insync sends me to page where I can give access permissions and receive Authentication Code. This code is valid only for some time.

My question is - HOW to acquire Google Drive Authentication Code? So each time puppet is applied - account is connected?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-09-25 10:46:11 -0600

could you run via exec curl or wget to download the info you need?

exec {'getdat':,
    command => '/usr/bin/curl -k -s -1|command to run data'


cheers Stuart

edit flag offensive delete link more


It wont help. link is redirect and to make things more complex - next page requires user to click ALLOW button, then it provide another page with Auth Code. So curl wont help. Unless I use some handmade script to aquire this code and return it to puppet.

T4ng10r gravatar imageT4ng10r ( 2015-09-25 13:08:45 -0600 )edit

answered 2015-09-25 10:54:59 -0600

GregLarkin gravatar image

Unless the insync client or Google provide a way to retrieve the code non-interactively, it will be difficult to do so. As you know, Puppet will not execute anything that requires interactive input.

However, it looks like other folks have had this same issue in a variety of forums, so maybe this will help:

edit flag offensive delete link more


Unfortunately - this is interactive connection. I need to click allow button and next page will provide AuthCode. I though that there's some ready to use procedure or module. I will look at provided link.

T4ng10r gravatar imageT4ng10r ( 2015-09-25 13:10:04 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-09-25 09:25:15 -0600

Seen: 5,771 times

Last updated: Sep 25 '15