123 lines
2.3 KiB
YAML
123 lines
2.3 KiB
YAML
---
|
|
- name: debug
|
|
debug:
|
|
var: proxy
|
|
|
|
- name: install packages from base
|
|
yum:
|
|
enablerepo: powertools
|
|
name:
|
|
- vim
|
|
- rsync
|
|
- lsof
|
|
- lynx
|
|
- postfix
|
|
- man
|
|
- mlocate
|
|
- mutt
|
|
- s-nail
|
|
- tcptraceroute
|
|
- wget
|
|
- yum-utils
|
|
- bash-completion
|
|
- git
|
|
- rsyslog
|
|
- tcpdump
|
|
- NetworkManager
|
|
- NetworkManager-initscripts-updown
|
|
- nc
|
|
state: installed
|
|
|
|
- name: install epel repos
|
|
yum:
|
|
name:
|
|
- epel-release
|
|
state: installed
|
|
|
|
- name: install packages from epel
|
|
yum:
|
|
name:
|
|
- htop
|
|
- glances
|
|
state: installed
|
|
become: true
|
|
|
|
- name: copy scripts
|
|
template:
|
|
src: "scripts/{{ item }}.j2"
|
|
dest: "{{ item }}"
|
|
mode: 0700
|
|
with_items:
|
|
- testSrv.sh
|
|
- sendWelcomeMail.sh
|
|
|
|
- name: create link
|
|
file:
|
|
src: changeIp.sh
|
|
dest: "{{ item }}"
|
|
state: link
|
|
with_items:
|
|
- vdg-ip
|
|
- stage-ip
|
|
- home-ip
|
|
|
|
- name: create link
|
|
file:
|
|
src: muttStage.sh
|
|
dest: "{{ item }}"
|
|
state: link
|
|
with_items:
|
|
- stg1
|
|
- stg2
|
|
- stg3
|
|
- stg4
|
|
- stg5
|
|
- stg6
|
|
- stg7
|
|
- stg8
|
|
- stg9
|
|
- stg10
|
|
- mailadmin
|
|
|
|
- name: limit the number of kernels installed on the server
|
|
replace:
|
|
path: /etc/yum.conf
|
|
regexp: '^installonly_limit=5'
|
|
replace: 'installonly_limit=2'
|
|
|
|
- name: bashrc
|
|
copy:
|
|
src: os/bashrc
|
|
dest: /root/.bashrc
|
|
|
|
- name: vimrc
|
|
copy:
|
|
src: os/vimrc
|
|
dest: /root/.vimrc
|
|
|
|
- name: block to intall VdG CA
|
|
block:
|
|
- name: get root VDG CA
|
|
get_url:
|
|
url: "http://intranet.ville-ge.ch/certs/{{ item }}"
|
|
dest: "/etc/pki/ca-trust/source/anchors/{{ item }}"
|
|
with_items:
|
|
- rootcavdg_ROOTVDG-CA.crt
|
|
- adsubca.crt
|
|
|
|
- name: update ca trust
|
|
shell: update-ca-trust
|
|
changed_when: false
|
|
|
|
- name: copy proxy.sh to profile
|
|
copy:
|
|
src: os/proxy.sh
|
|
dest: /etc/profile.d/proxy.sh
|
|
|
|
- name: add proxy line to yum.conf
|
|
lineinfile:
|
|
path: /etc/yum.conf
|
|
insertafter: EOF
|
|
line: proxy=http://proxy.ville-geneve.ch:8080
|
|
when: proxy|bool
|