Rvm Loading error -Playbook,ruby,rails

shekhar123
Tue, 12 Sep 2023 20:56:43 +0000
Get Help

this is the anisble script file :

- name: Install RVM and Ruby 3.0.0
 shell: |

   curl -sSL https://rvm.io/mpapis.asc | gpg --import -
   curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
   curl -sSL https://get.rvm.io | bash -s stable
   curl -sSL https://get.rvm.io -o rvm.sh
   cat /tmp/rvm.sh | bash -s stable --rails
 become_user: root

- name: Install RVM and Ruby 3.0.0
 shell: |
   source /home/ubuntu/.rvm/scripts/rvm
   rvm install 3.0.0
   rvm use 3.0.0 --default

when i run the ansible command got this error :
TASK [redisup : Install RVM and Ruby 3.0.0] ********************************************************************************************************************************
fatal: [node2]: FAILED! => {“changed”: true, “cmd”: “source /home/ubuntu/.rvm/scripts/rvm\nrvm install 3.0.0\nrvm use 3.0.0 --default\n”, “delta”: “0:00:00.003529”, “end”: “2023-09-12 20:45:28.672586”, “msg”: “non-zero return code”, “rc”: 127, “start”: “2023-09-12 20:45:28.669057”, “stderr”: “/bin/sh: 1: source: not found\n/bin/sh: 2: rvm: not found\n/bin/sh: 3: rvm: not found”, “stderr_lines”: [“/bin/sh: 1: source: not found”, “/bin/sh: 2: rvm: not found”, “/bin/sh: 3: rvm: not found”], “stdout”: “”, “stdout_lines”: }

5 posts - 3 participants

Read full topic