User Tools

Site Tools


automation:ansible

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

automation:ansible [2023/07/12 21:41] jotasandokuautomation:ansible [2023/11/02 14:38] (current) – external edit 127.0.0.1
Line 87: Line 87:
   * -a : arguments   * -a : arguments
  
-  ansible all -i inventory -m setup    # this collects facts 
   ansible all -i inventory -m setup    # this collects facts   ansible all -i inventory -m setup    # this collects facts
   ansible -i hosts all -m ping --private-key /home/student/ansible_key  # PING module, useful to test connectivity to the hosts   ansible -i hosts all -m ping --private-key /home/student/ansible_key  # PING module, useful to test connectivity to the hosts
Line 461: Line 460:
   * Roles can be downloaded from galaxy as part of collections.   * Roles can be downloaded from galaxy as part of collections.
   * We can also ''create our own roles'':   * We can also ''create our own roles'':
-  first we create the dir with subfolders: defaults, handlers, meta, tasks, templates, vars +  first we create the dir with subfolders: defaults, handlers, meta, tasks, templates, vars 
-This is an example of a custom role: [[https://github.com/sandervanvugt/rhce8-live/tree/0fd56c840f683af72a74647ad2f7118555153425/lesson11/roles/motd]]+  This is an example of a custom role: [[https://github.com/sandervanvugt/rhce8-live/tree/0fd56c840f683af72a74647ad2f7118555153425/lesson11/roles/motd]] 
   ansible-galaxy role init <my-role>   ansible-galaxy role init <my-role>
  
  
-__Junos specifics __+---- 
 + 
 +__roles for Junos __
 \\ \\
   * Roles (network engine role) act as wrappers. They allows us to use a yaml based parser (command_parser) instead of custom filters. This way, we make the code much shorter.   * Roles (network engine role) act as wrappers. They allows us to use a yaml based parser (command_parser) instead of custom filters. This way, we make the code much shorter.
Line 537: Line 539:
   * ''force_handlers'' : to force a handler that has been triggered to run, even if (another) task fails.   * ''force_handlers'' : to force a handler that has been triggered to run, even if (another) task fails.
   * [[https://stackoverflow.com/questions/42653655/ansible-ignore-errors-when|External Link]]   * [[https://stackoverflow.com/questions/42653655/ansible-ignore-errors-when|External Link]]
 +
 +
 +----
 +__AWX__
 +\\
 +  * Ansible Tower == AWS  =~ 'Ansible Automation Platform' (this latter is sold now by redhat)
 +  * {{ :automation:awx-sander-van-vugt.pdf |}}
 +  * **AWX uses k8s extensively**
 +Install minikube (ubuntu) with:
 +  minikube start --cpus=4 --memory=6g --addons=ingress --vm-driver=docker
automation/ansible.1689198097.txt.gz · Last modified: (external edit)