Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tools:ansible [2024/02/23 09:25] – [Install] darrontools:ansible [2025/03/27 13:37] (current) – [Ansible automation] darron
Line 3: Line 3:
 Ansible is an automation tool, a secure shell frontend with expect like functionality. Due to it using Ansible is an automation tool, a secure shell frontend with expect like functionality. Due to it using
 SSH it's a very simple service to utilise and requires only python to be installed on SSH it's a very simple service to utilise and requires only python to be installed on
-each managed machine. SSH should to be configured using authorized keys and is not documented here.+each managed machine. SSH should be configured using authorized keys and is not documented here.
  
 It is recommended to develop the process manually before implementing it in Ansible to allow understanding It is recommended to develop the process manually before implementing it in Ansible to allow understanding
Line 248: Line 248:
 supported modules. supported modules.
  
-Here is one to upgrade debian.+Here is one to update debian.
  
-__upgrade.yml__+__debian_update.yml__
 <code> <code>
 --- ---
Line 256: Line 256:
   become: yes   become: yes
   tasks:   tasks:
-  - name: Upgrade+  - name: UPDATE
     ansible.builtin.apt:     ansible.builtin.apt:
       update_cache: yes       update_cache: yes
       upgrade: full       upgrade: full
 +</code>
 +
 +And, another to update REDHAT, Eg. Oracle Linux
 +
 +__redhat_update.yml__
 +
 +<code>
 +---
 +- hosts: VM_REDHAT
 +  become: yes
 +  tasks:
 +  - name: UPDATE
 +    yum:
 +      name: '*'
 +      state: latest
 </code> </code>
  
Line 267: Line 282:
  
 <code> <code>
-ansible-playbook ~/.ansible/upgrade.yml+ansible-playbook ~/.ansible/debian_update.yml
 PLAY [home] *************************************************************************************************************** PLAY [home] ***************************************************************************************************************
  
Line 284: Line 299:
 ok: [PiF] ok: [PiF]
  
-TASK [Upgrade] ************************************************************************************************************+TASK [UPDATE] ************************************************************************************************************
 [WARNING]: Module invocation had junk after the JSON data: 1:23.50s [WARNING]: Module invocation had junk after the JSON data: 1:23.50s
 changed: [PiH] changed: [PiH]