Hi there,

What's the transport you are using?, Can you share the complete log(along
with command for execution)  and playbook you are running. You can give a
try by running playbook in  mode


Thanks,

On Sat, 28 Mar, 2020, 7:45 pm ansible Iac, <hanane.ghaz...@gmail.com> wrote:

> Hi everyone,
>
> I wanted to create a new crontab using ansible module "cron" , when i
> execute the script i didn't get any error message everything is ok , but
> when i chuck up on the node machine"192.168.1.147 " using the command
> crontab -u username -l  no crontab have been created  for username.
> here below my script and the final result  of it
> can someone suggest me any solution for this problem.
>
> - name: " create a new crontab "
>   cron:
>     name: "remove log file "
>     weekday: "2"
>     minute: "5"
>     hour: "10"
>     user: "username"
>     job: "1 0 * * 0 rm /home/username/*.log > /dev/null 2>&1"
>     state: present
>   register: result
>   become: yes
>   become_user: root
>
>
>
>  the result  :
>
> TASK [../../ans-create-lin-crontab : create a new crontab ]
> *************************************************************************************************************************************************
> changed: [192.168.1.147]
>
> PLAY RECAP
> *********************************************************************************************************************************************************************************************
> 192.168.1.147             : ok=56   changed=1    unreachable
>
>
> Thanks for any suggestion
>
> Kind regards .
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-devel/d9215444-64d7-4284-b340-9c1ea2f57db8%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-devel/d9215444-64d7-4284-b340-9c1ea2f57db8%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/CABqdUGLHFGYtWgneiEuji_YbN6v3YM8tm99joHF57YyDs46UXQ%40mail.gmail.com.

Reply via email to