📰 IT Security NachrichtenSony FE 8-14 mm F3.5: Fisheye mit Zirkular-Diagonal-Zoom im Test(10.09.2026 um 16:26 Uhr)
📰 IT Security NachrichtenKI-Modell für den Mond: Open-Source-Projekt soll Wasser-Eis finden(10.09.2026 um 16:46 Uhr)
📰 IT Security NachrichtenKirby and the World Beyond: Neues 3D-Abenteuer startet Anfang 2027(10.09.2026 um 17:07 Uhr)
📰 IT Security NachrichtenSchluss mit dem Gestank: Diese Saugroboter bringen eine echte Lösung(10.09.2026 um 17:50 Uhr)
📰 IT Security NachrichteniPhone Duo & MacBook Neo: Apple kopiert Microsoft(10.09.2026 um 18:10 Uhr)
📰 IT Security NachrichtenEuropäische Starlink-Alternative soll um hunderte Satelliten wachsen(10.09.2026 um 18:30 Uhr)
📰 IT Security NachrichtenApple-Schock: iPhone 17 Pro eingestellt, andere Preise stark erhöht(10.09.2026 um 19:07 Uhr)
📰 IT Security NachrichtenVibe Key & Pixbar: Ulanzi zeigt die Zukunft eures Schreibtischs(10.09.2026 um 19:30 Uhr)
📰 IT Security NachrichtenLuna: Diese 11 neuen Spiele verschenkt Amazon im September 2026(10.09.2026 um 20:30 Uhr)
📰 IT Security NachrichtenSony FE 8-14 mm F3.5: Fisheye mit Zirkular-Diagonal-Zoom im Test(10.09.2026 um 16:26 Uhr)
📰 IT Security NachrichtenKI-Modell für den Mond: Open-Source-Projekt soll Wasser-Eis finden(10.09.2026 um 16:46 Uhr)
📰 IT Security NachrichtenKirby and the World Beyond: Neues 3D-Abenteuer startet Anfang 2027(10.09.2026 um 17:07 Uhr)
📰 IT Security NachrichtenSchluss mit dem Gestank: Diese Saugroboter bringen eine echte Lösung(10.09.2026 um 17:50 Uhr)
📰 IT Security NachrichteniPhone Duo & MacBook Neo: Apple kopiert Microsoft(10.09.2026 um 18:10 Uhr)
📰 IT Security NachrichtenEuropäische Starlink-Alternative soll um hunderte Satelliten wachsen(10.09.2026 um 18:30 Uhr)
📰 IT Security NachrichtenApple-Schock: iPhone 17 Pro eingestellt, andere Preise stark erhöht(10.09.2026 um 19:07 Uhr)
📰 IT Security NachrichtenVibe Key & Pixbar: Ulanzi zeigt die Zukunft eures Schreibtischs(10.09.2026 um 19:30 Uhr)
📰 IT Security NachrichtenLuna: Diese 11 neuen Spiele verschenkt Amazon im September 2026(10.09.2026 um 20:30 Uhr)

🔧 Programmierung 🕛 vor 7 Monaten 5 Min Lesezeit
0

📘 Ansible Learning Journey - From Manual SSH to Automation Thinking

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

CloudWithHorla | Cloud & DevOps Engineer (Learning in Progress 🚀)



Automation looks simple from the outside — until you try to build it yourself.



Recently, I worked on an Ansible hands-on project as part of my continuous learning in Cloud and DevOps engineering. The goal was simple on paper:



set up a controller node and manage multiple target nodes using Ansible.





This setup mirrors what actually happens in real-world environments — not just labs.









🔧 What I Implemented (Step-by-Step)




  1. Provisioned EC2 instances




  • 1 controller

  • 3 managed nodes




  1. Installed core dependencies




  • Python3

  • Pip

  • Ansible on the controller




  1. Created Ansible configuration




  • Custom ansible.cfg

  • Inventory file defining all target nodes




  1. SSH Key-Based Authentication




  • Generated SSH key pair on the controller

  • Injected the controller’s public key into each node’s authorized_keys


  • Learned the difference between:


    CODE
     >>  # append (safe)
    > # overwrite (dangerous)





You are adding a new line of Public Key which is safe.




CODE
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCppACFB47TRDuT8YXSSxL+T9jxirz0yC04avxRB8nAOnVcz5xXpyT0mhYbhcLCbI2D4pcWkSb1NqGyUwF3OeHGtur+0MkDq7/9jhPG0amrFbk+RBQM+WZ7UaEzopiK7ZB8MUKwtMGVhR9wgtIiSK6+fgmzNaCpfj13B9aH7iiMRn4sHCwr81zCAskb79DnhCmB8Y7NU2VAqlMnW5NIFEujv3aixmPSZbIKomNotGT2ljtOV5EoMuFFqq3DqA/kZVM1WJjBMEAlWtdQTn2UM5dTAi5BNvPMYJcdzEfc4fXvkp11rFYLiEc9ZUFkYi6APg1Ju5bPgh0Yp+9YOhlCMEuEPlAdxUIHE4Ih3HoNhLOB622c+a6lNK5SF7Y76gB5cdK8Rar/tRQqF6kxqy852SLfZbLnXkfIOuktF4XGemMMt13F7yw1k980vwcwCgfAK4zOZ2hmaDypmG0Rd/lhsIpC+4i6s4T8a+AB3BSKt9KH/Dn9cxUM0BVgxgM1hWyk7Hs= ubuntu@ip-10-0-8-231" >> .ssh/authorized_keys






Caveat: Best practise



You are removing an existing "Public Key" which is not safe.




CODE
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCppACFB47TRDuT8YXSSxL+T9jxirz0yC04avxRB8nAOnVcz5xXpyT0mhYbhcLCbI2D4pcWkSb1NqGyUwF3OeHGtur+0MkDq7/9jhPG0amrFbk+RBQM+WZ7UaEzopiK7ZB8MUKwtMGVhR9wgtIiSK6+fgmzNaCpfj13B9aH7iiMRn4sHCwr81zCAskb79DnhCmB8Y7NU2VAqlMnW5NIFEujv3aixmPSZbIKomNotGT2ljtOV5EoMuFFqq3DqA/kZVM1WJjBMEAlWtdQTn2UM5dTAi5BNvPMYJcdzEfc4fXvkp11rFYLiEc9ZUFkYi6APg1Ju5bPgh0Yp+9YOhlCMEuEPlAdxUIHE4Ih3HoNhLOB622c+a6lNK5SF7Y76gB5cdK8Rar/tRQqF6kxqy852SLfZbLnXkfIOuktF4XGemMMt13F7yw1k980vwcwCgfAK4zOZ2hmaDypmG0Rd/lhsIpC+4i6s4T8a+AB3BSKt9KH/Dn9cxUM0BVgxgM1hWyk7Hs= ubuntu@ip-10-0-8-231" > .ssh/authorized_keys






Caveat: Not a best practise



Sample




  1. Privilege Escalation




  • Used become: true for system-level tasks

  • Ensured sudo access without breaking security





  1. Ansible Ad-Hoc Commands




CODE
   ansible -m apt -a "name=git state=present" all -b







  1. Ansible Playbook Execution




  • Installed and removed packages

  • Copied files to remote nodes

  • Managed services across multiple machines in parallel









📄 Sample Playbook used in my project:






CODE
---
- name: Installing nginx playbook
hosts: all
become: true
tasks:
- name: First Task
apt:
name: nginx
state: absent

- name: Second Task
apt:
name: nginx
state: present

- name: Copy file with owner and permissions
ansible.builtin.copy:
src: ./index.html
dest: /var/www/html/index.html
owner: root
group: root
mode: '0777'

- name: Third Task
apt:
name: apache2
state: present












⚠️ Challenges I Faced (and What I Learned)






1️⃣ “Permission denied (publickey)”



I initially thought Ansible could manage nodes without SSH access.

Through research and troubleshooting, I learned a critical truth:




Ansible always uses SSH. There is no automation without an initial trust path.




Key-based authentication must be established at least once — either at instance creation or manually.









2️⃣ PasswordAuthentication Confusion



I tried disabling password authentication before confirming key-based access.



That was a big lesson:




❌ Disabling PasswordAuthentication does NOT give access

✅ It only removes password login after SSH keys already work




Correct order matters:




  1. Establish SSH key access

  2. Test connectivity

  3. Then disable password authentication









3️⃣ APT Lock Errors (unattended-upgrades)



One node failed while others succeeded.



Cause:




  • Ubuntu auto-updates were running in the background



Lesson:




Infrastructure is not deterministic — nodes behave independently.




Solution:




  • Wait and retry

  • Or design playbooks with retries and checks






Screenshot Output





This is when I ping all the node





This is the second page output of my Playbook





Node 02






  • 🔐 Never overwrite authorized_keys

  • 🛠️ Real learning happens when things break









🌱 Growth Mindset



This project reinforced my core belief:




Never stop learning.




Every error I faced forced me to:




  • Research deeper

  • Read documentation

  • Understand why things work — not just how



I’m still learning.

I’m still breaking things.

And I’m still getting better — one tool at a time.









📌 Final Thought



Automation isn’t about avoiding work —

it’s about doing the work once, correctly and at scale.



CloudWithHorla ☁️

Cloud & DevOps Engineer | Always Learning

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
2 Quellen
T-Mobile will give you the iPhone 18 Pro for free – here’s how to preorder
1 Quelle
Asus: Erster Mini-Desktop mit Snapdragon X2 Elite - zu Mondpreisen
1 Quelle
Luna: Diese 11 neuen Spiele verschenkt Amazon im September 2026
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten 📘 Ansible Learning Journey - From Manual SSH to Automation Thinking

Thematisch verwandte Begriffe: Ansible, Learning, Journey, From · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...