Je suivais ce doc pour installer un paquet brillant dans RedHat 7.3. La commande fournie dans la doc est:Ansible paquet avertissement lors de l'utilisation de sudo
$ sudo su - \
-c "R -e \"install.packages('shiny', repos='https://cran.rstudio.com/')\""
En Ansible, je l'ai écrit comme ceci:
- name: Installing Shiny Packages
shell: sudo su - -c "R -e \"install.packages('shiny', repos='https://cran.rstudio.com/')\""
#when: install_R|changed
Je reçois un avertissement quand je lance mon PlayBook:
TASK [Installing Shiny Packages] ***********************************************
[WARNING]: Consider using 'become', 'become_method', and 'become_user' rather
than running sudo
changed: [test]
S'il vous plaît laissez-moi savoir comment écrire cela en ansible afin que je puisse éviter l'avertissement.
Comment écrire ceci sans sudo: '$ sudo su - \ -c "R -e \" install.packages ('brillant', repo = 'https: //cran.rstudio.com/') \ "" '? – user182944
@ user182944: vous ne savez pas si vous pouvez essayer 'shell: R -e" install.packages ('shiny', repos = 'https: //cran.rstudio.com/') "' – Inian