Code Monkey home page Code Monkey logo

ansible-role-linux's People

Contributors

cressm avatar inghamn avatar pgporada avatar sethcob avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-role-linux's Issues

Update NTP conf for Ubuntu 20.04

So far, we provide a custom NTP conf file as a template. However, this does not allow for the distro to provide variations over time.

Instead of writing a template, we should just make sure the server lines are added to the ntp.conf file.

Allow for no additional packages

If you want to run this role, but desire no addtional packages, you still must declare the "linux_packages" var. Otherwise it crashes.

Update to support RedHat distros

We are starting to want to run CentOS on servers. We need to update our Ansible roles to work with RPM based distros as well as DEB.

Document the vars that this role expects

The README does not mention the vars that are expected by this role and what they are used for. It would be nice to not have to read through all the task YML files to discover this.

Disable cloud-config networking

Cloud-config makes it more difficult to make network changes. We should have Ansbile turn this off for us, as part of a base linux install.

Add handler for systemd daemon-reload

Ubuntu 20.04 has started adding directory restrictions to services, such as Tomcat. When we deploy apps that need access to config or data directories, we have to override the service definition. The app's playbook will be responsible for providing a systemd drop-in unit file, but we'll need to call systemctl daemon-reload for it to take effect.

Ubuntu 20.04 does not include language packs

Our web applications usually require locales (en_US) for the i18n to work. Ubuntu 20.04 server no longer installs any locales, by default. (It used to install en_US).

We'll need to add the locale installation to our Ansible scripts.

Update system level umask

We use the staff group to control permissions on the content of /srv. However, we never set a umask, so when one staff member adds a file, the file is still not editable by the next staff member.

We should set a good umask for this.

Disable systemd-resolv

Ubuntu uses a local systemd-resolv deamon. It keeps getting in the way of our local DNS environment, though.

We should have ansible disable this service, and replace it with static nameservers in resolv.conf

UFW default commands now require a direction

You must specify a direction when declaring default deny. I think this is something that changed in 18.04. Ansible's latest version has been updated to throw an error if you do not declare a direction.

Install OpenVM tools only on virtual machines

We have been installing open-vm-tools on all machines. Recently we moved it's declaration out of the main task, and declared it in group_vars.

#5

OpenVM tools should be installed by core, but only when the host is a virtual machine. We'll need to check the CPU the kernel is running on to see if it's a VM.

Update apt-get install commands to new syntax

The old way of doing apt with-items is deprecated. The new way is to declare a variable for all the package names.

New style for apt-get install

- name: "Install Dependencies"
  apt:
    name: "{{ packages }}"
    state: present
  vars:
    packages:
      - "postgis"

Old, deprecated style

- name: "Install Dependencies"
  apt:
    name: "{{ item }}"
    state: present
  with_items:
    - "postgis"

update-ca-certificates not run after playbook fails

When a playbook or role errors out, any handlers notified during that run are forgotten. However, subsequent runs of the same playbook or role will not re-notify the handler.

On a given run, the cert is correctly copied to the host. Then, later on during that run, there's an error in the role, and it fails out. Subsequent runs of the playbook will not, then, notify the handler, since the presence of the correct cert file means it shouldn't re-notify.

Move cron.daily to run earlier

Ubuntu's default configuration sets cron.daily stuff to start running at 6:00 am. Unattended upgrades are part of that, and occur fairly late in the process. By the time Unattended Upgrades run and reboot, it's usually 8:00 am. This is putting upgrades and reboots into normal working hours.

We should adjust crontab to start the cron.daily stuff earlier.

I know Ubuntu is usuing Anacron, so we'll need to make sure we understand how to control when things run.

Variables should be named to match the role name

Ansible does not have namespacing, and variables are read from ALL group_vars files. We need to make sure to distinguish similar variables from different roles.

We must rename all variables declared in the linux role to be linux_*

Move base package list to group_vars

We want to allow for hosts to customize the base package list. The packages should not be hard coded in the role. For instance, we now have a line for VM-tools; however, we use this on physical machines as well.

We should be able to customize the base packages.

Linux role should create the backup directory

The linux role already creates a standard place for cron backup scripts, and sets permissions on /srv. We should go ahead and create the /srv/backups directory. This is the directory all applications should use to send nightly backups.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.