Thanks Vinoth. It worked
Yes . I learnt that we can use the formatting as in python either with ' '
or " ".
On Thursday, August 1, 2019 at 8:59:32 AM UTC+5:30, vinoth kumar wrote:
>
>
>
> On Thu, 1 Aug 2019 at 8:57 AM, vinoth kumar > wrote:
>
>> Error clearly says to use proper quotes
On Thu, 1 Aug 2019 at 8:57 AM, vinoth kumar wrote:
> Error clearly says to use proper quotes
> This would be fine i think so
> “netstat -nautp |grep -iE ‘137|389|445|636’|awk '{print $5}' |cut -d: -f2
> |grep -iwE ‘137|389|445|636’”
> Save it in Regiter
> Use set_facts to store as a variable
>
>
Error clearly says to use proper quotes
‘netstat -nautp |grep -iE "137|389|445|636" |awk '{print $5}' |cut -d: -f2
|grep -iwE "137|389|445|636"’
Save it in Regiter
Use set_facts to store as a variable
On Thu, 1 Aug 2019 at 8:31 AM, Veera wrote:
> Hi,
>
> I am trying the below snippet to
Hi,
I am trying the below snippet to detect the established ports. but
Ansible throws an error.
- name: List the port connections
shell: "netstat -nautp |grep -iE "137|389|445|636" |awk '{print $5}'
|cut -d: -f2 |grep -iwE "137|389|445|636"
register: dc_stat
debug: