Skip to content

cmd method appends a trailing ' to each line. #76

@hedgehog

Description

@hedgehog
$ ruby --version       
ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-linux]

Adding this command string (NOTE: there is a trailing space on each line) to clouds.rb:

cmd_str=<<-EOT
echo deb http://apt.opscode.com/ debian contrib >/etc/apt/sources.list.d/opscode.list
curl http://apt.opscode.com/packages@opscode.com.gpg.key | apt-key add -
echo deb http://ppa.launchpad.net/alestic/ppa/ubuntu $(lsb_release -cs) main >/etc/apt/sources.list.d/alestic-ppa.list  
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BE09C571 
apt-get update 
apt-get install -y ec2-consistent-snapshot 
EOT
cmd cmd_str

Givesives this output on invoking cloud-configure

result for i-731c8b18 ==> n.ssh("echo deb http://apt.opscode.com/ debian contrib >/etc/apt/sources.list.d/opscode.list \ncurl http://apt.opscode.com/packages@opscode.com.gpg.key | apt-key add - \necho deb http://ppa.launchpad.net/alestic/ppa/ubuntu $(lsb_release -cs) main >/etc/apt/sources.list.d/alestic-ppa.list \napt-key adv --keyserver keyserver.ubuntu.com --recv-keys BE09C571 \napt-get update \napt-get install -y ec2-consistent-snapshot \n", {})                           
OK                                                                                              
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                 
                Dload  Upload   Total   Spent    Left  Speed                   
105  1690  105  1690    0     0    99k      0 --:--:-- --:--:-- --:--:-- 1650k                  
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys BE09C571 '                                                        
'                                                                                               
gpg: "'" not a key ID: skipping                                                                 
gpg: "'" not a key ID: skipping                                                                 
gpg: requesting key BE09C571 from hkp server keyserver.ubuntu.com                               
gpg: key BE09C571: "Launchpad PPA for Alestic" not changed                                      
gpg: Total number processed: 1                                                                  
gpg:              unchanged: 1                                                                  
E: The update command takes no arguments                                                        
E: Type ''' is not known on line 2 in source list /etc/apt/sources.list.d/alestic-ppa.list      
E: The list of sources could not be read.                                                       

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions