Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
joohanhong
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
JooHan Hong
joohanhong
Commits
339f6d37
Commit
339f6d37
authored
Mar 09, 2021
by
JooHan Hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2021-03-09, update2
parent
cec510bc
Pipeline
#5131
passed with stages
in 2 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
6 deletions
+68
-6
README.md
ANSIBLE/OS/PACKAGE/MINIMAL/README.md
+67
-6
README.md
ANSIBLE/OS/PACKAGE/README.md
+1
-0
No files found.
ANSIBLE/OS/PACKAGE/MINIMAL/README.md
View file @
339f6d37
...
...
@@ -6,7 +6,8 @@
## 주요 기능
-
수행 후 APT_PACKAGES/
*IP주소*
/
*일자*
/dpkg_result.txt 파일을 남기도록 한다.
-
OS Minimal 설치 후 최소한의 Package를 설치한다.
-
RedHat/Debian 계열에 따라 조건을 수행한다.
## Inventory 설정
...
...
@@ -42,8 +43,8 @@ ansible_python_interpreter: python2.7
```python
---
-
name:
Debian(Minimal Install) Basic APT Package Install
hosts:
DEPLOY
-
name:
Basic OS Package Installing
hosts:
ALL_HOSTS
vars:
time: "{{lookup('pipe','date
\"
+%Y%m%d_%H%M
\"
')}}"
environment:
...
...
@@ -83,10 +84,13 @@ ansible_python_interpreter: python2.7
stat:
path: /etc/apt/sources.list_src
register: apt_sourcelist_backup
when: ansible_os_family == "Debian"
-
name: /etc/apt/sources.list_src file backup
command: cp -rf /etc/apt/sources.list /etc/apt/sources.list_src
when: apt_sourcelist_backup.stat.exists == False
when:
-
apt_sourcelist_backup.stat.exists == False
-
ansible_os_family == "Debian"
-
name: APT source sources.list file copy
copy:
...
...
@@ -95,9 +99,9 @@ ansible_python_interpreter: python2.7
owner: 'root'
group: 'root'
mode: 0644
#attr: i
with_items:
[
'sources.list_9_130'
]
[
'sources.list'
]
when: ansible_os_family == "Debian"
-
name: Install a list of packages
apt:
...
...
@@ -125,6 +129,7 @@ ansible_python_interpreter: python2.7
-
mdadm
-
nfs-common
update_cache: yes
when: ansible_os_family == "Debian"
-
name: Stop & Disabled Serivces
systemd:
...
...
@@ -133,6 +138,62 @@ ansible_python_interpreter: python2.7
enabled: no
with_items:
-
exim4
when: ansible_os_family == "Debian"
-
name: Install a list of packages
yum: name={{ item }} update_cache=yes
with_items:
-
vim
-
telnet
-
lvm2
-
sysstat
-
ftp
-
device-mapper-multipath
-
device-mapper-multipath-lib
-
setuptool
-
sysfsutils
-
sg3_utils
-
dos2unix
-
lsof
-
iptstate
-
ipmitool
-
lrzsz
-
zlib-devel
-
tcl
-
tcl-devel
-
cmake
-
nmap
-
iptraf
-
tcpdump
-
net-tools
-
psmisc
-
tree
-
rdate
-
bash-completion
-
wget
-
gcc
-
gcc-c++
-
openssl
-
openssl-devel
-
zip
-
unzip
-
autoconf
-
smartmontools
-
ncurses-devel
-
rsync
-
bind-utils
-
ntp
-
chrony
when: ansible_os_family == "CentOS"
-
name: Stop & Disabled Serivces
systemd:
name: "{{ item }}"
state: stopped
enabled: no
with_items:
-
postfix
when: ansible_os_family == "CentOS"
```
...
...
ANSIBLE/OS/PACKAGE/README.md
View file @
339f6d37
...
...
@@ -71,6 +71,7 @@ ansible_python_interpreter: python2.7
`OS Package Manager`에 대한 Playbook 분석
* [ ] Inventory에 지정된 호스트가 만약 Debian 계열이라면 dpkg-query -f '${binary:Package}\n' -W 명령을 수행한다.
* [ ] Inventory에 지정된 호스트가 만약 RedHat 계열이라면 rpm -qa 명령을 수행한다.
* [ ] 수행 Sheel 상에서 결과를 출력하고, 증적은 APT_PACKAGES/ 디렉토리에 기록한다.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment