2012-10-17 20:33:38 +00:00
|
|
|
---
|
2013-05-15 20:57:44 +00:00
|
|
|
|
|
|
|
- name: sshd_config
|
2013-05-20 21:58:11 +00:00
|
|
|
action: copy src=$item dest=/etc/ssh/sshd_config mode=600
|
2013-05-20 20:25:00 +00:00
|
|
|
with_first_found:
|
2013-05-15 20:57:44 +00:00
|
|
|
- $sshd_config
|
2013-05-15 21:06:21 +00:00
|
|
|
- ${files}/ssh/sshd_config.${ansible_fqdn}
|
|
|
|
- ${files}/ssh/sshd_config.${host_group}
|
|
|
|
- ${files}/ssh/sshd_config.${dist_tag}
|
|
|
|
- ${files}/ssh/sshd_config.${ansible_distribution}
|
2013-05-15 20:57:44 +00:00
|
|
|
notify:
|
|
|
|
- restart sshd
|
|
|
|
tags:
|
|
|
|
- sshd_config
|
|
|
|
- config
|
|
|
|
- sshd
|
|
|
|
|
|
|
|
- name: set root passwd
|
|
|
|
action: user name=root password=$rootpw state=present
|
|
|
|
tags:
|
|
|
|
- rootpw
|
|
|
|
|
|
|
|
- name: add ansible root key
|
|
|
|
action: authorized_key user=root key='$FILE(${files}/common/ansible-pub-key)'
|
|
|
|
tags:
|
|
|
|
- config
|
|
|
|
|
2013-05-17 19:22:26 +00:00
|
|
|
|
2012-10-17 20:33:38 +00:00
|
|
|
- name: default packages to install
|
|
|
|
action: yum state=installed name=$item
|
|
|
|
with_items:
|
2013-05-21 22:07:41 +00:00
|
|
|
- bind-utils
|
2012-10-17 20:33:38 +00:00
|
|
|
- joe
|
2013-05-21 22:07:41 +00:00
|
|
|
- mailx
|
2012-10-17 20:33:38 +00:00
|
|
|
- nc
|
|
|
|
- openssh-clients
|
|
|
|
- patch
|
2013-05-15 22:00:21 +00:00
|
|
|
- postfix
|
2013-05-21 22:07:41 +00:00
|
|
|
- strace
|
|
|
|
- telnet
|
2013-05-21 20:33:54 +00:00
|
|
|
- tmpwatch
|
2013-05-21 22:07:41 +00:00
|
|
|
- traceroute
|
|
|
|
- vim-enhanced
|
2012-10-17 20:33:38 +00:00
|
|
|
- xz
|
|
|
|
- zsh
|
|
|
|
tags:
|
|
|
|
- packages
|
|
|
|
|
2013-05-24 14:52:32 +00:00
|
|
|
#### RHEL SPECIFIC - see the only_if
|
2013-05-24 14:42:39 +00:00
|
|
|
- name: default pkgs to remove on rhel
|
2012-10-17 20:33:38 +00:00
|
|
|
action: yum state=removed name=$item
|
|
|
|
with_items:
|
|
|
|
- logwatch
|
|
|
|
- firstboot-tui
|
|
|
|
- bluez-utils
|
|
|
|
- sendmail
|
2013-05-15 20:57:44 +00:00
|
|
|
only_if: '$is_rhel'
|
2012-10-17 20:33:38 +00:00
|
|
|
tags:
|
|
|
|
- packages
|
|
|
|
|
2013-05-24 14:52:32 +00:00
|
|
|
|
|
|
|
### END RHEL SPECIFIC ####
|
|
|
|
|
|
|
|
### FEDORA SPECIFIC BITS ####
|
|
|
|
|
2013-05-24 14:42:39 +00:00
|
|
|
- name: default pkgs to remove on fedora
|
|
|
|
action: yum state=removed name=$item
|
|
|
|
with_items:
|
|
|
|
- firewalld
|
|
|
|
- PackageKit*
|
|
|
|
- sendmail
|
2013-05-24 15:15:20 +00:00
|
|
|
- at
|
2013-05-24 14:42:39 +00:00
|
|
|
only_if: '$is_fedora'
|
|
|
|
tags:
|
|
|
|
- packages
|
|
|
|
|
|
|
|
- name: pkgs to install on fedora
|
2013-05-24 14:52:32 +00:00
|
|
|
action: yum state=installed name=$item
|
2013-05-24 14:42:39 +00:00
|
|
|
with_items:
|
|
|
|
- iptables-services
|
|
|
|
only_if: '$is_fedora'
|
|
|
|
tags:
|
|
|
|
- packages
|
|
|
|
|
2013-05-24 14:52:32 +00:00
|
|
|
- name: disabled services on fedora
|
2012-10-17 20:33:38 +00:00
|
|
|
action: service state=stopped enabled=false name=$item
|
|
|
|
with_items:
|
2013-05-24 14:52:32 +00:00
|
|
|
- avahi-daemon
|
|
|
|
only_if: '$is_fedora'
|
2012-10-17 20:33:38 +00:00
|
|
|
tags:
|
2013-05-21 20:15:34 +00:00
|
|
|
- service
|
2012-10-17 20:33:38 +00:00
|
|
|
- config
|
|
|
|
|
2013-05-24 14:52:32 +00:00
|
|
|
#### END FEDORA SPECIFIC ####
|
|
|
|
|
|
|
|
|
2012-10-17 20:33:38 +00:00
|
|
|
- name: iptables
|
2012-10-18 15:57:06 +00:00
|
|
|
action: template src=$item dest=/etc/sysconfig/iptables mode=600
|
2013-05-20 20:25:00 +00:00
|
|
|
with_first_found:
|
2012-10-18 15:57:06 +00:00
|
|
|
- $iptables
|
|
|
|
- $files/iptables/iptables.${ansible_fqdn}
|
|
|
|
- $files/iptables/iptables.${host_group}
|
|
|
|
- $files/iptables/iptables
|
2012-10-17 20:33:38 +00:00
|
|
|
notify:
|
|
|
|
- restart iptables
|
|
|
|
tags:
|
|
|
|
- iptables
|
|
|
|
- config
|
|
|
|
|
2012-10-18 15:57:06 +00:00
|
|
|
# XXX fixme # a datacenter 'fact' from setup
|
2012-10-17 20:33:38 +00:00
|
|
|
- name: /etc/resolv.conf
|
2013-05-29 22:15:50 +00:00
|
|
|
action: copy src=$item dest=/etc/resolv.conf
|
2013-05-20 20:25:00 +00:00
|
|
|
with_first_found:
|
2013-05-29 22:15:50 +00:00
|
|
|
- ${resolvconf}
|
|
|
|
- $files/resolv.conf/${ansible_fqdn}
|
|
|
|
- $files/resolv.conf/${host_group}
|
|
|
|
- $files/resolv.conf/${datacenter}
|
|
|
|
- $files/resolv.conf/resolv.conf
|
2012-10-17 20:33:38 +00:00
|
|
|
tags:
|
|
|
|
- config
|
|
|
|
- resolvconf
|
|
|
|
|
|
|
|
- name: rsyslog.conf
|
2013-05-29 22:15:50 +00:00
|
|
|
action: copy src=$item dest=/etc/rsyslog.conf mode=644
|
2013-05-20 20:25:00 +00:00
|
|
|
with_first_found:
|
2012-10-18 15:57:06 +00:00
|
|
|
- $rsyslogconf
|
|
|
|
- $files/rsyslog/rsyslog.conf.${ansible_fqdn}
|
|
|
|
- $files/rsyslog/rsyslog.conf.${host_group}
|
|
|
|
- $files/rsyslog/rsyslog.conf.${datacenter}
|
|
|
|
- $files/rsyslog/rsyslog.conf
|
|
|
|
|
2012-10-17 20:33:38 +00:00
|
|
|
notify:
|
|
|
|
- restart rsyslog
|
|
|
|
tags:
|
|
|
|
- rsyslogd
|
|
|
|
- config
|
|
|
|
|
|
|
|
- name: /etc/postfix/main.cf
|
2012-10-18 15:57:06 +00:00
|
|
|
action: copy src=$item dest=/etc/postfix/main.cf
|
2013-05-20 20:25:00 +00:00
|
|
|
with_first_found:
|
2012-10-17 20:33:38 +00:00
|
|
|
- $postfix_maincf
|
2012-10-18 15:57:06 +00:00
|
|
|
- $files/postfix/main.cf.${ansible_fqdn}
|
|
|
|
- $files/postfix/main.cf.${host_group}
|
|
|
|
- $files/postfix/main.cf.${postfix_group}
|
|
|
|
- $files/postfix/main.cf
|
2012-10-17 20:33:38 +00:00
|
|
|
notify:
|
2012-11-19 22:06:46 +00:00
|
|
|
- restart postfix
|
2012-10-17 20:33:38 +00:00
|
|
|
tags:
|
|
|
|
- postfix
|
|
|
|
- config
|
|
|
|
|