Re: [Dev] How to get the current Location path in Puppet

2014-08-20 Thread Chamila De Alwis
Cool! I didn't know about the inline_template function.


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com




On Thu, Aug 21, 2014 at 9:32 AM, Yasassri Ratnayake 
wrote:

> The manifest code will look like following,
>
> $var1 = inline_template("<%= Dir.pwd %>")
> notice ("This Current Location : ${dummy}")
>
> With Regards,
>
>
> On Thu, Aug 21, 2014 at 9:17 AM, Yasassri Ratnayake 
> wrote:
>
>> Hi Rajith,
>>
>> Thanks for the prompt answer, the above answer is specific to finding
>> users home directory, my requirement is to get the current file location
>> (The location may not be the home directory). Thanks to Chamila I have
>> found a way to do this [1].
>>
>> [1] -
>> http://stackoverflow.com/questions/1937743/how-to-get-the-current-working-directorys-absolute-path-from-irb
>>
>>
>> On Thu, Aug 21, 2014 at 8:41 AM, Rajith Vitharana 
>> wrote:
>>
>>> Hi Yasassri,
>>>
>>> Will [1] help?
>>>
>>> [1] -
>>> http://serverfault.com/questions/420749/puppet-get-users-home-directory
>>>
>>> Thanks,
>>>
>>>
>>> On Thu, Aug 21, 2014 at 8:37 AM, Yasassri Ratnayake 
>>> wrote:
>>>
 Hi,

 Is there a way to do the $subject? For example if I'm running a
 puppet.pp script from */home/puppet.pp*, Is there a way to get the
 current file location path ("/home")?


 With Regards,
 --
 Yasassri Ratnayake
 Software Engineer - QA
 WSO2 Inc ; http://wso2.com
 lean.enterprise.middleware
 *Mobile : +94715933168 <%2B94715933168>*
 *Blog : http://yasassriratnayake.blogspot.com/
 *

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev


>>>
>>>
>>> --
>>> Rajith Vitharana
>>>
>>> Software Engineer,
>>> WSO2 Inc. : wso2.com
>>> Mobile : +94715883223
>>> Blog : http://lankavitharana.blogspot.com/
>>>
>>
>>
>>
>> --
>> Yasassri Ratnayake
>> Software Engineer - QA
>> WSO2 Inc ; http://wso2.com
>> lean.enterprise.middleware
>> *Mobile : +94715933168 <%2B94715933168>*
>> *Blog : http://yasassriratnayake.blogspot.com/
>> *
>>
>
>
>
> --
> Yasassri Ratnayake
> Software Engineer - QA
> WSO2 Inc ; http://wso2.com
> lean.enterprise.middleware
> *Mobile : +94715933168 <%2B94715933168>*
> *Blog : http://yasassriratnayake.blogspot.com/
> *
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to get the current Location path in Puppet

2014-08-20 Thread Yasassri Ratnayake
The manifest code will look like following,

$var1 = inline_template("<%= Dir.pwd %>")
notice ("This Current Location : ${dummy}")

With Regards,


On Thu, Aug 21, 2014 at 9:17 AM, Yasassri Ratnayake 
wrote:

> Hi Rajith,
>
> Thanks for the prompt answer, the above answer is specific to finding
> users home directory, my requirement is to get the current file location
> (The location may not be the home directory). Thanks to Chamila I have
> found a way to do this [1].
>
> [1] -
> http://stackoverflow.com/questions/1937743/how-to-get-the-current-working-directorys-absolute-path-from-irb
>
>
> On Thu, Aug 21, 2014 at 8:41 AM, Rajith Vitharana 
> wrote:
>
>> Hi Yasassri,
>>
>> Will [1] help?
>>
>> [1] -
>> http://serverfault.com/questions/420749/puppet-get-users-home-directory
>>
>> Thanks,
>>
>>
>> On Thu, Aug 21, 2014 at 8:37 AM, Yasassri Ratnayake 
>> wrote:
>>
>>> Hi,
>>>
>>> Is there a way to do the $subject? For example if I'm running a
>>> puppet.pp script from */home/puppet.pp*, Is there a way to get the
>>> current file location path ("/home")?
>>>
>>>
>>> With Regards,
>>> --
>>> Yasassri Ratnayake
>>> Software Engineer - QA
>>> WSO2 Inc ; http://wso2.com
>>> lean.enterprise.middleware
>>> *Mobile : +94715933168 <%2B94715933168>*
>>> *Blog : http://yasassriratnayake.blogspot.com/
>>> *
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Rajith Vitharana
>>
>> Software Engineer,
>> WSO2 Inc. : wso2.com
>> Mobile : +94715883223
>> Blog : http://lankavitharana.blogspot.com/
>>
>
>
>
> --
> Yasassri Ratnayake
> Software Engineer - QA
> WSO2 Inc ; http://wso2.com
> lean.enterprise.middleware
> *Mobile : +94715933168 <%2B94715933168>*
> *Blog : http://yasassriratnayake.blogspot.com/
> *
>



-- 
Yasassri Ratnayake
Software Engineer - QA
WSO2 Inc ; http://wso2.com
lean.enterprise.middleware
*Mobile : +94715933168*
*Blog : http://yasassriratnayake.blogspot.com/
*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to get the current Location path in Puppet

2014-08-20 Thread Yasassri Ratnayake
Hi Rajith,

Thanks for the prompt answer, the above answer is specific to finding users
home directory, my requirement is to get the current file location (The
location may not be the home directory). Thanks to Chamila I have found a
way to do this [1].

[1] -
http://stackoverflow.com/questions/1937743/how-to-get-the-current-working-directorys-absolute-path-from-irb


On Thu, Aug 21, 2014 at 8:41 AM, Rajith Vitharana  wrote:

> Hi Yasassri,
>
> Will [1] help?
>
> [1] -
> http://serverfault.com/questions/420749/puppet-get-users-home-directory
>
> Thanks,
>
>
> On Thu, Aug 21, 2014 at 8:37 AM, Yasassri Ratnayake 
> wrote:
>
>> Hi,
>>
>> Is there a way to do the $subject? For example if I'm running a puppet.pp
>> script from */home/puppet.pp*, Is there a way to get the current file
>> location path ("/home")?
>>
>>
>> With Regards,
>> --
>> Yasassri Ratnayake
>> Software Engineer - QA
>> WSO2 Inc ; http://wso2.com
>> lean.enterprise.middleware
>> *Mobile : +94715933168 <%2B94715933168>*
>> *Blog : http://yasassriratnayake.blogspot.com/
>> *
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Rajith Vitharana
>
> Software Engineer,
> WSO2 Inc. : wso2.com
> Mobile : +94715883223
> Blog : http://lankavitharana.blogspot.com/
>



-- 
Yasassri Ratnayake
Software Engineer - QA
WSO2 Inc ; http://wso2.com
lean.enterprise.middleware
*Mobile : +94715933168*
*Blog : http://yasassriratnayake.blogspot.com/
*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to get the current Location path in Puppet

2014-08-20 Thread Rajith Vitharana
Hi Yasassri,

Will [1] help?

[1] -
http://serverfault.com/questions/420749/puppet-get-users-home-directory

Thanks,


On Thu, Aug 21, 2014 at 8:37 AM, Yasassri Ratnayake 
wrote:

> Hi,
>
> Is there a way to do the $subject? For example if I'm running a puppet.pp
> script from */home/puppet.pp*, Is there a way to get the current file
> location path ("/home")?
>
>
> With Regards,
> --
> Yasassri Ratnayake
> Software Engineer - QA
> WSO2 Inc ; http://wso2.com
> lean.enterprise.middleware
> *Mobile : +94715933168 <%2B94715933168>*
> *Blog : http://yasassriratnayake.blogspot.com/
> *
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Vitharana

Software Engineer,
WSO2 Inc. : wso2.com
Mobile : +94715883223
Blog : http://lankavitharana.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] How to get the current Location path in Puppet

2014-08-20 Thread Yasassri Ratnayake
Hi,

Is there a way to do the $subject? For example if I'm running a puppet.pp
script from */home/puppet.pp*, Is there a way to get the current file
location path ("/home")?


With Regards,
-- 
Yasassri Ratnayake
Software Engineer - QA
WSO2 Inc ; http://wso2.com
lean.enterprise.middleware
*Mobile : +94715933168*
*Blog : http://yasassriratnayake.blogspot.com/
*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev