Sign inSign up

sown/ansible-lint

By sown

•Updated about 6 years ago

Yet Another (M)ansible-Lint image

Image
0

10K+

sown/ansible-lint repository overview

⁠SOWN Ansible

Role-based Ansible configuration

⁠Usage

⁠Cloning the repo

You need to include submodules to get monitoring scripts as well:

user@sown-auth2:~$ git clone --recurse-submodules [email protected]:sown/ansible.git
Cloning into 'ansible'...
...
⁠Netbox setup

You'll need a netbox token stored in the NETBOX_TOKEN environment variable. For example, echo "export NETBOX_TOKEN=abcd" >> ~/.bashrc; chmod 600 ~/.bashrc

You can create one through the Netbox admin interface, or steal one from /home/tim/.bashrc if you have root on auth2.

⁠Running everything

This will run everything, but won't make changes, and print a full diffs of changes that would be made.

user@sown-auth2:~/ansible$ sudo -E ansible-playbook -i hosts.yml playbook.yml --diff --check

Remove --check to actually make changes.

⁠Running against a single host
user@sown-auth2:~/ansible$ sudo -E ansible-playbook -i hosts.yml playbook.yml --diff --check --limit VMS

You can run this (without --check) against a new host to set it up with standard SOWN configuration.

⁠Running a single role via tags

It can take a while to run everything, so you can selectively run parts of our ansible configuration via tags. See the documentation below for tags you can use.

user@sown-auth2:~/ansible$ sudo -E ansible-playbook -i hosts.yml playbook.yml --diff --check --tags pxe

⁠Working on roles

New roles should be developed on branches, and changes rolled out to all servers before merging to master. Therefore, master should be kept in a state where the main playbook can be run, without making changes to servers.

⁠Tags

  • common
    • sown-common
      • utilities
      • motd
    • monitored
      • nrpe
    • cron-mail-redirect
    • unattended-upgrades
  • pxe
    • dnsmasq
    • ipxe
  • backed-up

Tag summary

Content type

Image

Digest

Size

101.3 MB

Last updated

about 6 years ago

docker pull sown/ansible-lint