10000 GitHub - saikiranpi/Ansible-Testing: Ansible-Testing
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

saikiranpi/Ansible-Testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Ansible Topics 0. Enable call backs in ansible.cfg [defaults] callbacks_enabled = timer, profile_tasks, profile_roles #The above provided playbook and task execution time which can allow us to identiy slow running playbooks. Enable Ansible Log in export ANSIBLE_LOG_PATH=~/ansible.log export ANSIBLE_DEBUG=True

  1. Adhoc commands * ansible -i invfile pvt -m ping ansible -i invfile pvt -m shell -a "df -h" ansible -i invfile pvt -m shell -a "df -h | grep -i /dev/root" -vvvv ansible -i invfile server01:server02 -m shell -a "df -h | grep -i /dev/root" ansible -i invfile 'all:!server01' -m shell -a "df -h | grep -i /dev/root" ansible -i invfile 'all:&megastar' -m shell -a "df -h | grep -i /dev/root" ansible -i invfile2 'all:&megastar' -m shell -a "df -h | grep -i /dev/root" ansible -i invfile pvt -m user -a "name=superstar state=present" --become ansible -i invfile pvt -m shell -a "cat /etc/passwd | grep -i superstar" ansible -i invfile pvt -m setup #Prints ansible_facts for clients

  2. with_items for running iterations. *

  3. when condition *

  4. Register output & return code using rc *

  5. Ansible facts using Redis & Notify & Handlers & get_url & unarchive modules in redis playbook.

          • ansible -i /root/ansiblecode/invfile all -m setup If you are unable to connect to clients, then redis is also be a issue. Disable redis config and try again.
  1. Copy, File, No_Log, Debug *
  2. Verbosity using -vvvv
  3. ignore_errors: true *
  4. block, rescue & always
  5. Vault Encrypt String and File for aws_creds *
  6. shell & command modules *
  7. become_user *
  8. serial option select how many machine can run at a time. serial 1 will run
    on one machine only. *
  9. lineinfile *
  10. Docker Swarm Configuration *
  11. Set-fact *
  12. --extra-vars ansible_user='ubuntu'
  13. fetch
  14. tags *
  15. Jinja Templates *
  16. Pre & Post Tasks *
  17. Roles and Ansible Galaxy *
  18. Dynamic Inventory
  19. AWX

About

Ansible-Testing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0