Skip to content
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

Rclone config location #138

Open
hongbo-miao opened this issue Aug 11, 2023 · 1 comment
Open

Rclone config location #138

hongbo-miao opened this issue Aug 11, 2023 · 1 comment

Comments

@hongbo-miao
Copy link

hongbo-miao commented Aug 11, 2023

I am trying to add Rclone config during installation. Here is what I found:

I installed Rclone by

- name: Install Rclone
  hosts: hm-ubuntu
  roles:
    - role: stefangweichinger.ansible_rclone
      vars:
        rclone_configs:
          - name: hm-s3
            properties:
              type: s3
              provider: AWS
              access_key_id: xxx
              secret_access_key: xxx
              region: us-west-2
              storage_class: STANDARD

However, after installing, Rclone cannot find the config I added. Rclone expects to read the config at the location ~/.config/rclone/rclone.conf, while ansible-rclone installed the config file at /root/.config/rclone/rclone.conf.

parallels@ubuntu-linux-22-04-desktop:/usr/bin$ which rclone
/usr/local/bin/rclone

parallels@ubuntu-linux-22-04-desktop:/usr/bin$ ls -l /usr/local/bin/rclone
-rwxr-xr-x 1 root root 48037888 Jul 17 06:48 /usr/local/bin/rclone

parallels@ubuntu-linux-22-04-desktop:/usr/bin$ rclone config file
Configuration file doesn't exist, but rclone will use this path:
/home/parallels/.config/rclone/rclone.conf

parallels@ubuntu-linux-22-04-desktop:/usr/bin$ rclone config
2023/08/11 15:01:34 NOTICE: Config file "/home/parallels/.config/rclone/rclone.conf" not found - using defaults
No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> 
parallels@ubuntu-linux-22-04-desktop:/usr/bin$ sudo cat /root/.config/rclone/rclone.conf
[sudo] password for parallels: 
[hm-s3]
type = s3
provider = AWS
access_key_id = xxx
secret_access_key = xxx
region = us-west-2
storage_class = STANDARD

To make it work, I need further add:

        rclone_config_location: "{{ ansible_env.HOME }}/.config/rclone/rclone.conf"
        rclone_config_owner:
          OWNER: "{{ ansible_env.USER }}"
          GROUP: "{{ ansible_env.USER }}"

I am wondering should we use ~/.config/rclone/rclone.conf as default location and set non-root user for the config file?
Or it is just be design maybe make it easy to share between multiple users? Thanks! 😃

@hongbo-miao hongbo-miao changed the title Rclone config default location Rclone config location Aug 11, 2023
@stefangweichinger
Copy link
Owner

Thanks for your feedback. I have to think about this ... currently busy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants