Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

ansible tar with a datestamp

---
- hosts: localhost
  become: no
  gather_facts: yes

  tasks:
   - name: Display the available timestamp format in Ansible
     shell: cp /etc/nsswitch.conf  /etc/nsswitch.conf.{{ ansible_date_time.iso8601 }}

   - name: Display the newly created file
     shell: ls -lrt /etc/nsswitch.conf.{{ ansible_date_time.iso8601 }}
     register: LISTFILE

   - debug: msg={{ LISTFILE.stdout }}
Comment

PREVIOUS NEXT
Code Example
::  
Shell :: Installing nano on Debian/Ubuntu machines 
::  
:: command to lists available Wi-Fi access points known to NetworkManager including its speed, security, signal, and more on linux 
:: Heroku bash vim 
::  
::  
Shell ::  
::  
::  
:: ros galactic build from source 
Shell ::  
::  
Shell ::  
::  
::  
:: Continuous bash script to do tasks 
::  
::  
::  
::  
Shell ::  
Shell ::  
Shell :: android studio avd system image download 
Shell ::  
Shell ::  
Shell ::  
Shell ::  
:: Wallpaper kali 
Shell ::  
ADD CONTENT
Topic
Content
Source link
Name
7+8 =