commit 6ad990a713bd6a6705f0b72694791687cf9f86c2 Author: Vlad Raducanu Date: Thu Mar 25 12:48:24 2021 +0000 Initial commit of Ansible repository diff --git a/home_linux/home_inventory.yml b/home_linux/home_inventory.yml new file mode 100644 index 0000000..2dfb5e2 --- /dev/null +++ b/home_linux/home_inventory.yml @@ -0,0 +1,7 @@ +all: + hosts: + 192.168.1.50: + 192.168.1.51: + 192.168.1.52: + 192.168.1.53: + \ No newline at end of file diff --git a/home_linux/linux_apt_update.yml b/home_linux/linux_apt_update.yml new file mode 100644 index 0000000..1071543 --- /dev/null +++ b/home_linux/linux_apt_update.yml @@ -0,0 +1,37 @@ +--- +- name: Update and upgrade packages on Raspberries + hosts: all + roles: + - common + remote_user: vlad + become: yes + vars: + run: false + reboot: false + + tasks: + + - name: Update package repositories + apt: update_cache=yes force_apt_get=yes cache_valid_time=3600 + + - name: Upgrade packages on targets + apt: upgrade=dist force_apt_get=yes + + - name: Get uptime information + shell: "/usr/bin/uptime" + register: my_uptime + + - name: Print uptime information + debug: + var: my_uptime.stdout + verbosity: 0 + + - name: Get interface configuration + shell: "ifconfig" + register: my_interfaces + + - name: Print MOTD information + debug: + var: my_interfaces.stdout_lines + verbosity: 0 + diff --git a/home_linux/roles/common/vars/main.yml b/home_linux/roles/common/vars/main.yml new file mode 100644 index 0000000..f8991e1 --- /dev/null +++ b/home_linux/roles/common/vars/main.yml @@ -0,0 +1,10 @@ +$ANSIBLE_VAULT;1.1;AES256 +31666463666365373361376466353930626265313734613733373563633666626164623631306164 +3561636664356439316164316535346430333563323530650a323735643862393664663064363936 +38336566356333393131376330663361666365376336616163333762663235346366303338303233 +3339666266376130610a356538616431303836366363616232626430616439343035633539373130 +33666336616365333139353466613730663565383862346166393433366632616234646330336133 +30626535653264653639613962346165626461383439616232613166343431636263396261613830 +38636534383936363261643362646234663463346435353430396564356162303135353266353237 +31393664376564646632636165663433356262663564666338656431313631333938373038316464 +3939