Initial commit of Ansible repository
This commit is contained in:
commit
6ad990a713
7
home_linux/home_inventory.yml
Normal file
7
home_linux/home_inventory.yml
Normal file
@ -0,0 +1,7 @@
|
||||
all:
|
||||
hosts:
|
||||
192.168.1.50:
|
||||
192.168.1.51:
|
||||
192.168.1.52:
|
||||
192.168.1.53:
|
||||
|
||||
37
home_linux/linux_apt_update.yml
Normal file
37
home_linux/linux_apt_update.yml
Normal file
@ -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
|
||||
|
||||
10
home_linux/roles/common/vars/main.yml
Normal file
10
home_linux/roles/common/vars/main.yml
Normal file
@ -0,0 +1,10 @@
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
31666463666365373361376466353930626265313734613733373563633666626164623631306164
|
||||
3561636664356439316164316535346430333563323530650a323735643862393664663064363936
|
||||
38336566356333393131376330663361666365376336616163333762663235346366303338303233
|
||||
3339666266376130610a356538616431303836366363616232626430616439343035633539373130
|
||||
33666336616365333139353466613730663565383862346166393433366632616234646330336133
|
||||
30626535653264653639613962346165626461383439616232613166343431636263396261613830
|
||||
38636534383936363261643362646234663463346435353430396564356162303135353266353237
|
||||
31393664376564646632636165663433356262663564666338656431313631333938373038316464
|
||||
3939
|
||||
Loading…
Reference in New Issue
Block a user