Disable /etc/hosts task since there are edge cases

This commit is contained in:
Zachary Seguin 2017-05-26 23:55:53 -04:00
parent 8bcc1e129d
commit 416d3e344f
1 changed files with 158 additions and 158 deletions

View File

@ -1,7 +1,7 @@
--- ---
- name: Update /etc/hosts #- name: Update /etc/hosts
template: src=hosts # template: src=hosts
dest=/etc/hosts # dest=/etc/hosts
- name: Disable resolvconf - name: Disable resolvconf
service: name={{ item }} state=stopped enabled=no service: name={{ item }} state=stopped enabled=no
@ -9,172 +9,172 @@
- resolvconf - resolvconf
- systemd-resolved - systemd-resolved
ignore_errors: yes ignore_errors: yes
#
- name: Remove resolvconf - name: Remove resolvconf
package: package:
name: resolvconf name: resolvconf
state: absent state: absent
#
- name: Remove immutable on resolv.conf - name: Remove immutable on resolv.conf
command: chattr -i /etc/resolv.conf command: chattr -i /etc/resolv.conf
ignore_errors: yes ignore_errors: yes
#
- name: Copy resolv.conf - name: Copy resolv.conf
copy: copy:
src: resolv.conf src: resolv.conf
dest: /etc/resolv.conf dest: /etc/resolv.conf
#attributes: 'ie' #attributes: 'ie'
#
- name: Set immutable on resolv.conf - name: Set immutable on resolv.conf
command: chattr +i /etc/resolv.conf command: chattr +i /etc/resolv.conf
#
- name: Install root dotfiles #- name: Install root dotfiles
copy: src={{ item.src }} dest={{ item.dest }} backup=no # copy: src={{ item.src }} dest={{ item.dest }} backup=no
with_items: # with_items:
- { src: 'root-dotfiles/bashrc', dest: '/root/.bashrc' } # - { src: 'root-dotfiles/bashrc', dest: '/root/.bashrc' }
- { src: 'root-dotfiles/bash-preexec', dest: '/root/.bash-preexec' } # - { src: 'root-dotfiles/bash-preexec', dest: '/root/.bash-preexec' }
- { src: 'root-dotfiles/vimrc', dest: '/root/.vimrc' } # - { src: 'root-dotfiles/vimrc', dest: '/root/.vimrc' }
#
- name: Install Shells #- name: Install Shells
apt: name={{ item }} state=latest # apt: name={{ item }} state=latest
with_items: # with_items:
- bash # - bash
- zsh # - zsh
- zsh-doc # - zsh-doc
- dash # - dash
- ksh # - ksh
- tcsh # - tcsh
- csh # - csh
- rc # - rc
- bash-doc # - bash-doc
- bash-completion # - bash-completion
#
- name: Install Editors #- name: Install Editors
apt: name={{ item }} state=latest # apt: name={{ item }} state=latest
with_items: # with_items:
- vim-nox # - vim-nox
- ed # - ed
- nano # - nano
#
- name: Install words #- name: Install words
apt: name={{ item }} state=latest # apt: name={{ item }} state=latest
with_items: # with_items:
- wamerican-insane # - wamerican-insane
#
- name: Install utils #- name: Install utils
apt: name={{ item }} state=latest # apt: name={{ item }} state=latest
with_items: # with_items:
- acl # - acl
- tmux # - tmux
- screen # - screen
- less # - less
- lsof # - lsof
- bc # - bc
- dc # - dc
- psmisc # - psmisc
- procps # - procps
- htop # - htop
- schedtool # - schedtool
- pciutils # - pciutils
- rsync # - rsync
- iotop # - iotop
- attr # - attr
- tree # - tree
- parted # - parted
- mosh # - mosh
#
- name: Install compression #- name: Install compression
apt: name={{ item }} state=latest # apt: name={{ item }} state=latest
with_items: # with_items:
- bzip2 # - bzip2
- gzip # - gzip
- pax # - pax
- lzma # - lzma
- xz-utils # - xz-utils
- cpio # - cpio
#
- name: Install ncurses #- name: Install ncurses
apt: name={{ item }} state=latest # apt: name={{ item }} state=latest
with_items: # with_items:
- ncurses-bin # - ncurses-bin
- ncurses-term # - ncurses-term
#
- name: Install network #- name: Install network
apt: name={{ item }} state=latest # apt: name={{ item }} state=latest
with_items: # with_items:
- iputils-ping # - iputils-ping
- iputils-arping # - iputils-arping
- traceroute # - traceroute
- telnet # - telnet
- iproute2 # - iproute2
- ethtool # - ethtool
- dnsutils # - dnsutils
- whois # - whois
- wget # - wget
- curl # - curl
- netcat-traditional # - netcat-traditional
- netcat-openbsd # - netcat-openbsd
- vlan # - vlan
- bridge-utils # - bridge-utils
- tcpdump # - tcpdump
- tshark # - tshark
- ftp # - ftp
- tftp # - tftp
#
- name: Install ntp #- name: Install ntp
apt: name=ntp state=latest # apt: name=ntp state=latest
#
- name: Copy NTP configuration #- name: Copy NTP configuration
copy: # copy:
src: ntp.conf # src: ntp.conf
dest: /etc/ntp.conf # dest: /etc/ntp.conf
backup: no # backup: no
#
- name: Restart NTP #- name: Restart NTP
service: # service:
name: ntp # name: ntp
state: restarted # state: restarted
#
- name: Install debian package management #- name: Install debian package management
apt: name={{ item }} state=latest # apt: name={{ item }} state=latest
with_items: # with_items:
- aptitude # - aptitude
- dselect # - dselect
#
- name: Install gpg #- name: Install gpg
apt: name=gnupg state=latest # apt: name=gnupg state=latest
#
- name: Install rsyslog #- name: Install rsyslog
apt: name={{ item }} state=latest # apt: name={{ item }} state=latest
with_items: # with_items:
- rsyslog # - rsyslog
- rsyslog-gnutls # - rsyslog-gnutls
#
# TODO: Configure logging # # TODO: Configure logging
#
- name: Restart rsyslog #- name: Restart rsyslog
service: # service:
name: rsyslog # name: rsyslog
state: restarted # state: restarted
#
- name: Install fail2ban #- name: Install fail2ban
apt: name=fail2ban state=latest # apt: name=fail2ban state=latest
#
- name: Install man pages #- name: Install man pages
apt: name={{ item }} state=latest # apt: name={{ item }} state=latest
with_items: # with_items:
- manpages # - manpages
- info # - info
#
- name: Install molly-guard #- name: Install molly-guard
apt: name=molly-guard state=latest # apt: name=molly-guard state=latest
#
- name: Install ssmtp #- name: Install ssmtp
apt: name=ssmtp state=latest # apt: name=ssmtp state=latest
#
- name: Configure ssmtp #- name: Configure ssmtp
lineinfile: dest=/etc/ssmtp/ssmtp.conf # lineinfile: dest=/etc/ssmtp/ssmtp.conf
state=present # state=present
backrefs=yes # backrefs=yes
regexp='^#(FromLineOverride=YES)$' # regexp='^#(FromLineOverride=YES)$'
line='\\1' # line='\\1'