-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatical creation of token #149
Comments
Sorry, I don't know. I don't use that feature, it came from another user in a PR I would have to look for. Maybe search the commits yourself ... I am busy right now. |
look here: #133 maybe ask @tigattack |
And by the way, on my Ubuntu server service name is another
|
You can define a However, even though it is possible, you described the issue with this approach in your initial description:
Interactive authentication is not something that this role supports and, unless you use a service account, Google Drive authentication is an interactive process. I would suggest you use service account authentication if you require the entire process to be hands-off. |
is that still an issue? |
@tigattack if you say that I can generate in any pc the token during But if I pass empty data like this |
Sorry, I'm not clear on exactly what the problem is here. More detail would be great; as much info as possible on how you're using this role (including variable definitions with secrets obfuscated), what your goal is, and how you expect the end result to look and function. |
I just don't want to do any manual work to generate token. Would be nice just to pass this variables
|
As far as I can tell, everything that you've shown so far is working as designed and documented.
I hope I've understood the issue correctly, but please let me know if that's not the case. |
do you mean variables something like this?
|
Exactly. I believe it would need to be passed in string form, though. For example, this is one of mine: rclone_configs:
- name: "{{ rclone.remote_names.gmedia }}"
properties:
type: drive
scope: drive
service_account_credentials: "{{ (lookup('ansible.builtin.unvault', 'google_service_account.json')).strip() | string }}" If not sourcing from an ansible-vault encrypted file, it would look something like this: rclone_configs:
- name: "{{ rclone.remote_names.gmedia }}"
properties:
type: drive
scope: drive
service_account_credentials: ' {"type":"service_account","project_id":"my-project-id","private_key_id":"abcdef1234567890abcdef1234567890abcdef12","private_key":"-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANB ... Y1TC6i69A=\n-----END PRIVATE KEY-----\n","client_email":"[email protected]","client_id":"123456789012345678901","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/my-service-account%40my-project-id.iam.gserviceaccount.com"}' Note As mentioned in the readme re. the |
oh, looks like something complex. Looks like ganerating and saving of token is indeed more easy way. Thank you :) |
Hi! As I see from your docs, I can not to define
token
property. I was sure that it should generate automaticallyansible-rclone/README.md
Lines 154 to 171 in 2aec630
But on practice it doesn't with error
And it becomes to work after I generated token via
rclone config reconnect GoogleDriveRemote:\
in web brouser. But it has dedicated expiry time that can be a problem.So, how do you recommend me to work?
The text was updated successfully, but these errors were encountered: