Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

when hostname ansible

# Use Special Variable inventory_hostname
when: inventory_hostname == 'your_inventory_name'
Comment

ansible set hostname from facts

- name: Set proper hostname
  hostname:
    #name: hostvars[inventory_hostname].ansible_host
    name: "{{ hostvars[inventory_hostname].ansible_host }}"
  become: yes
  when:
    - ansible_facts['os_family'] == 'Suse'
Comment

PREVIOUS NEXT
Code Example
Shell :: crictl image prune 
Shell :: bash maximum running time 
Shell :: bash ls and pick 2nd column 
Shell :: git remote add ssh 
Shell :: tmux status line with blank line on top 
Shell :: check file path linux 
Shell :: awk uppercase first character 
Shell :: ls recursive 
Shell :: strip first character form output linux 
Shell :: move all files in subdirectories to current directory linux 
Shell :: Endpoint Security VPN build 986000724 is already installed on this computer. 
Shell :: grep get everything between two strings 
Shell :: git new branch create 
Shell :: how to define a variable in bashrc 
Shell :: cmd for pushing to github for the first time 
Shell :: Reduce brightness below minimum on Ubuntu 
Shell :: delete archivelog sysdate-1 
Shell :: install brew linux 
Shell :: update hour linux 
Shell :: mocha quiet 
Shell :: how many number of lines in a file 
Shell :: how to install mongodb in ubuntu 20.04 stackoverflow 
Shell :: install jenkins on ubuntu 20.04 
Shell :: cannot find module inquirer 
Shell :: mac docker-compose 
Shell :: install react redux 
Shell :: apache disable tls 1.0 
Shell :: kubectl connect to node bash 
Shell :: kazam recorder ubuntu 
Shell :: xampp apachae not starting 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =