Notice what your error message is ... /opt/seafile/test/seafile-serv er-6.2.5/setup-seafile-mysql.py: Permission denied make sure that /opt/seafile/test/seafile-server-6.2.5/setup-seafile-mysql.py is executable
On Wed, May 16, 2018 at 7:50 PM, 程伟 <[email protected]> wrote: > > > 在 2018年5月16日星期三 UTC+8下午8:31:53,Jochen Haeberle写道: >> >> Hi, >> >> I am trying to install seafile with Puppet. Puppet 5.5.1 on Debian 9. >> >> seafile is installed with an interactive shellscript calling a python >> script. I prepared an answer file, which is interactively working fine, up >> until where the db password is asked for. The input there is handled >> differently, not echoed back to the prompt and the execution changes to >> interactively for the input. >> >> The code part getting the user input looks like the following: >> >> # prompt for user input >> if password: >> answer = getpass.getpass(desc).strip() >> else: >> answer = raw_input(desc).strip() >> >> Is there a way to get this to work in Puppet? I tried with the following >> exec: >> >> exec { 'run seafile installer w answers file': >> command => >> "/opt/seafile/${instanz}/${seafile_folder}/setup-seafile-mysql.py >> /opt/seafile/${instanz}/${seafile_folder}5/${instanz}-answers.txt", >> creates => "/opt/seafile/${instanz}/seafile-server-latest", >> require => Archive[$seafile_archive], >> provider => shell, >> } >> >> but I get: >> >> Notice: >> /Stage[main]/Role::Share_server/Archive[seafile-server_6.2.5_x86-64.tar.gz]/ensure: >> download archive from puppet:///modules/profile/seaf >> ile/seafile-server_6.2.5_x86-64.tar.gz to >> /opt/seafile/installed/seafile-server_6.2.5_x86-64.tar.gz >> and extracted in /opt/seafile/test with cleanup >> Notice: /Stage[main]/Role::Share_server/File[/opt/seafile/test/seafi >> le-server-6.2.5/test-answers.txt]/ensure: defined content as >> '{md5}25f64045b6676488e407c84c6a18eb20' >> Notice: /Stage[main]/Role::Share_server/Exec[run seafile installer w >> answers file]/returns: /bin/sh: 1: /opt/seafile/test/seafile-serv >> er-6.2.5/setup-seafile-mysql.py: Permission denied >> >> Can it be done? >> >> Thanks in advance >> >> Jochen >> > > I think it is a problem about command in exec resource. Why not try " > /opt/seafile/${instanz}/${seafile_folder}/setup-seafile-mysql.py > /opt/seafile/${instanz}/${seafile_folder}5/${instanz}-answers.txt" in > your shell? Or try "*python* > /opt/seafile/${instanz}/${seafile_folder}/setup-seafile-mysql.py > /opt/seafile/${instanz}/${seafile_folder}5/${instanz}-answers.txt"? When > you make it works in shell, then try it in puppet. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/puppet-users/92b21e37-9ecc-49dd-8d61-4f522278d54e%40googlegroups.com > <https://groups.google.com/d/msgid/puppet-users/92b21e37-9ecc-49dd-8d61-4f522278d54e%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAHu%2B3OxWr3b5aeWeB6%2BNYShwtc3j_L5XNOGSyivi9CQsO48pMA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
