Skip to content

Latest commit

 

History

History
35 lines (32 loc) · 2.22 KB

README.md

File metadata and controls

35 lines (32 loc) · 2.22 KB

ansible-examples

  • library/test.sh contains a simple test module.
  • In playbook.xml, we are calling this module.
  • To run:
    cd own-module-example
    ansible-playbook playbook.yml
    
    
  • input-set sets fact foo to bar.
  • input-get gets fact foo using debug module.
  • To run:
    cd pass-data-between-roles
    ansible-playbook playbook.yml
    
  • playbook1 sets fact foo to bar.
  • playbook2 gets fact foo using debug module.
  • To run:
    cd pass-data-between-playbooks
    ansible-playbook masterplaybook.yml
    
  • masterplaybook is the main playbook which is used to call a sample role whose output is stored in the variable "output".
  • The sample role echo has a task defined which stores the output of the role into the variable in JSON format.
  • To run:
    cd role-output-in-playbook
    ansible-playbook masterplaybook.yml