Skip to content

Latest commit

 

History

History
182 lines (134 loc) · 6.43 KB

README.md

File metadata and controls

182 lines (134 loc) · 6.43 KB

linux_postinstall

Build Status

Ansible role.

Configure Linux: aliases, apparmor, authorized keys, automatic upgrades, bluetooth, cron, gpsd, grub, hostname, hosts, iptables, latex, lid, logrotate, modem manager, modules, netplan, nfsd, packages, pm-utils, postfix, repos, smart, speech-dispatcher, ssh, sshd, sudoers, swap, sysctl, timesyncd, timezone, udev, users, virtualbox, wpa_gui, wpa_supplicant, xen, xorg.conf.d, (wip ...)

Tested with Ubuntu 18.04. Some tasks tested with CentOS 7.

Requirements

None.

Variables

Read the defaults and examples in vars.

Workflow

  1. Install the role.
# ansible-galaxy install vbotka.linux_postinstall
  1. Change variables.
# editor vbotka.linux_postinstall/vars/main.yml
  1. Create the inventory.
# cat hosts
[host1]
host1.example.com
[host1:vars]
ansible_connection=ssh
ansible_user=root
ansible_python_interpreter=/usr/bin/python2.7
ansible_perl_interpreter=/usr/bin/perl
  1. Create the playbook.
# cat linux-postinstall.yml

- hosts: host1
  roles:
    - vbotka.linux_postinstall
  1. Run the playbook.
# ansible-playbook linux-postinstall.yml

Best practice

Perform syntax check of the playbook

# ansible-playbook linux-postinstall.yml --syntax-check

Run the playbook in in check mode first

# ansible-playbook linux-postinstall.yml --check

If all is right run the playbook twice. In second run all tasks shall be OK and 0 changed, unreachable and failed.

# ansible-playbook linux-postinstall.yml

Recommended configuration after the installation of OS

  1. Configure users, sudoers and persistent network interfaces
# ansible-playbook linux-postinstall.yml -t lp_users
# ansible-playbook linux-postinstall.yml -t lp_sudoers
# ansible-playbook linux-postinstall.yml -t lp_udev
  1. Reboot

  2. Configure iptables

# ansible-playbook linux-postinstall.yml -t lp_iptables
  1. Configure network connection

  2. Configure other tasks

# ansible-playbook linux-postinstall.yml

License

license

Author Information

Vladimir Botka

References