📦 NEW: Added PLaybooks
This commit is contained in:
2534
Output-Example.js
Normal file
2534
Output-Example.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -26,3 +26,9 @@ The similar command is used to update the cache on all hosts:
|
|||||||
- ansible all -m apt -a 'upgrade=dist update_cache=yes' --become --ask-become-pass
|
- ansible all -m apt -a 'upgrade=dist update_cache=yes' --become --ask-become-pass
|
||||||
- ansible all -m apt -a 'upgrade=yes update_cache=yes' --become --ask-become-pass
|
- ansible all -m apt -a 'upgrade=yes update_cache=yes' --become --ask-become-pass
|
||||||
- ansible all -m apt -a 'name=nginx state=latest' --become --ask-become-pass --limit root@49.13.21.211
|
- ansible all -m apt -a 'name=nginx state=latest' --become --ask-become-pass --limit root@49.13.21.211
|
||||||
|
|
||||||
|
# Run Playbook
|
||||||
|
- ansible-playbook playbook.yml --ask-become-pass
|
||||||
|
|
||||||
|
# Check Tags in Playbook
|
||||||
|
- ansible-playbook --list-tags playbook-Name.yml
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
|
[main_server]
|
||||||
root@49.13.21.211
|
root@49.13.21.211
|
||||||
|
|
||||||
|
[backup_server]
|
||||||
|
root@49.13.21.212
|
||||||
|
|
||||||
|
|||||||
80
uatiz-required-packages.pb.yml
Normal file
80
uatiz-required-packages.pb.yml
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- hosts: ["main_server"]
|
||||||
|
become: yes
|
||||||
|
tasks:
|
||||||
|
# - name: Download google-chrome-stable_current_amd64.deb
|
||||||
|
# tags: ["download-google-chrome-stable"]
|
||||||
|
# get_url:
|
||||||
|
# url: https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
||||||
|
# dest: /tmp/google-chrome-stable_current_amd64.deb
|
||||||
|
# when: ansible_distribution in ["Ubuntu", "Debian"] and ansible_distribution_version in ["20.04", "22.04"]
|
||||||
|
|
||||||
|
# - name: Install google-chrome-stable_current_amd64.deb
|
||||||
|
# tags: ["install-google-chrome-stable"]
|
||||||
|
# package:
|
||||||
|
# deb: /tmp/google-chrome-stable_current_amd64.deb
|
||||||
|
# # dpkg_options: 'force-confold,force-confdef'
|
||||||
|
# when: ansible_distribution in ["Ubuntu", "Debian"] and ansible_distribution_version in ["20.04", "22.04"]
|
||||||
|
|
||||||
|
- name: Install google-chrome-stable_current_amd64.deb
|
||||||
|
tags: ["install-google-chrome-stable"]
|
||||||
|
package:
|
||||||
|
name: google-chrome-stable
|
||||||
|
state: latest
|
||||||
|
update_cache: yes
|
||||||
|
cache_valid_time: 3600
|
||||||
|
allow_downgrade: yes
|
||||||
|
when: ansible_distribution in ["Ubuntu", "Debian"] and ansible_distribution_version in ["20.04", "22.04"]
|
||||||
|
|
||||||
|
- name: Install Uatiz Required Packages
|
||||||
|
tags: ["install-uatiz-required-packages"]
|
||||||
|
package:
|
||||||
|
name:
|
||||||
|
- gconf-service
|
||||||
|
- libasound2
|
||||||
|
- libatk1.0-0
|
||||||
|
- libc6
|
||||||
|
- libcairo2
|
||||||
|
- libcups2
|
||||||
|
- libdbus-1-3
|
||||||
|
- libexpat1
|
||||||
|
- libfontconfig1
|
||||||
|
- libgcc1
|
||||||
|
- libgconf-2-4
|
||||||
|
- libgdk-pixbuf2.0-0
|
||||||
|
- libglib2.0-0
|
||||||
|
- libgtk-3-0
|
||||||
|
- libnspr4
|
||||||
|
- libpango-1.0-0
|
||||||
|
- libpangocairo-1.0-0
|
||||||
|
- libstdc++6
|
||||||
|
- libx11-6
|
||||||
|
- libx11-xcb1
|
||||||
|
- libxcb1
|
||||||
|
- libxcomposite1
|
||||||
|
- libxcursor1
|
||||||
|
- libxdamage1
|
||||||
|
- libxext6
|
||||||
|
- libxfixes3
|
||||||
|
- libxi6
|
||||||
|
- libxrandr2
|
||||||
|
- libxrender1
|
||||||
|
- libxss1
|
||||||
|
- libxtst6
|
||||||
|
- ca-certificates
|
||||||
|
- fonts-liberation
|
||||||
|
- libappindicator1
|
||||||
|
- libnss3
|
||||||
|
- lsb-release
|
||||||
|
- xdg-utils
|
||||||
|
- wget
|
||||||
|
- libgbm-dev
|
||||||
|
- libatk-bridge2.0-0
|
||||||
|
- libxkbcommon-x11-0
|
||||||
|
- libxdamage-dev
|
||||||
|
state: latest
|
||||||
|
update_cache: yes
|
||||||
|
cache_valid_time: 3600
|
||||||
|
allow_downgrade: yes
|
||||||
|
when: ansible_distribution in ["Ubuntu", "Debian"] and ansible_distribution_version in ["20.04", "22.04"]
|
||||||
21
update-apt-packages.pb.yml
Normal file
21
update-apt-packages.pb.yml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- hosts: ["main_server"]
|
||||||
|
become: yes
|
||||||
|
tasks:
|
||||||
|
- name: Update Repository Index [apt update]
|
||||||
|
tags: ["update-apt-packages"]
|
||||||
|
package:
|
||||||
|
update_cache: yes
|
||||||
|
cache_valid_time: 3600
|
||||||
|
register: apt_update
|
||||||
|
when: ansible_distribution in ["Ubuntu", "Debian"] and ansible_distribution_version in ["20.04", "22.04"]
|
||||||
|
|
||||||
|
- name: Upgrade Dist[apt upgrade]
|
||||||
|
tags: ["upgrade-apt-packages"]
|
||||||
|
package:
|
||||||
|
upgrade: dist
|
||||||
|
force_apt_get: yes
|
||||||
|
autoremove: yes
|
||||||
|
autoclean: yes
|
||||||
|
when: ansible_distribution in ["Ubuntu", "Debian"] and ansible_distribution_version in ["20.04", "22.04"]
|
||||||
Reference in New Issue
Block a user