Fedora Infrastructure Ansible Repository
Find a file
Francois Andrieu 3696752d08 logview: use dateutil for date parsing
Signed-off-by: Francois Andrieu <naolwen@gmail.com>
2020-07-16 18:29:34 +00:00
cache_plugins Revert "Lets try not dropping ansible_python from cache" 2020-06-07 10:19:09 -07:00
callback_plugins callback_plugins: try and run a simple 2to3 over the logdetail plugin 2020-06-04 15:24:09 -07:00
ci CI: Run yamllint on added or modified YAML files 2020-07-09 15:40:09 +00:00
files loopabull: farewell loopabull, you served us well. 2020-07-09 16:51:46 -07:00
filter_plugins Drop fedmsg_qa_network concept 2020-06-11 22:49:59 +00:00
handlers Remove the fedora-messaging@koji_sync_listener 2020-06-11 13:22:49 -04:00
inventory Revert "inventory: re-add autosign01 to run ansible against it" 2020-07-16 09:30:40 -07:00
library Spring cleaning time. :) 2020-05-13 14:02:41 -07:00
playbooks download: change /mnt/koji/compose mount on download servers 2020-07-16 10:24:01 -07:00
roles put in dhcpd for vmhost19 2020-07-16 14:12:46 -04:00
scripts logview: use dateutil for date parsing 2020-07-16 18:29:34 +00:00
tasks 2fa_client: add tags so we can just run this by itself if needed. 2020-06-24 08:26:47 -07:00
vars Drop another use of white/blacklist 2020-06-12 09:22:33 -07:00
.gitignore [release-monitoring] Add librariesio consumer 2020-04-24 21:34:09 +02:00
.mailmap Add a .mailmap to map all my commits to one author in git shortlog. This is purely for my sanity, but also demonstrates how someone else could do similarly if needed. 2018-08-27 22:56:55 +00:00
.yamllint.yaml CI: Run yamllint on added or modified YAML files 2020-07-09 15:40:09 +00:00
.zuul.yaml CI: Run yamllint on added or modified YAML files 2020-07-09 15:40:09 +00:00
CONVENTIONS conventions: you guessed it, another whitespace change 2020-05-03 13:49:56 -07:00
master.yml loopabull: farewell loopabull, you served us well. 2020-07-09 16:51:46 -07:00
README Convert README to a symlink to README.md 2020-05-03 17:36:01 -04:00
README.md Adjust the readme file to make more clear about the repo vs the control host we run things on. 2020-07-02 11:39:12 -07:00
STYLEGUIDE style: add initial style guide 2019-06-21 20:53:30 +00:00

Fedora Infrastructure

Welcome! This is the Fedora Infrastructure Ansible Pagure project.

This repository is also mirrored for production runs to https://infrastructure.fedoraproject.org/infra/ansible/ but this is the working repository where changes are made.

If you would like to help out with Fedora Infrastructure, see:

Ansible repository/structure

files - files and templates for use in playbooks/tasks
      - subdirs for specific tasks/dirs highly recommended

inventory - where the inventory and additional vars is stored
          - All files in this directory in ini format
          - added together for total inventory
  group_vars:
          - per group variables set here in a file per group
  host_vars:
          - per host variables set here in a file per host

library - library of custom local ansible modules

playbooks - collections of plays we want to run on systems

  groups: groups of hosts configured from one playbook.

  hosts: playbooks for single hosts.

  manual: playbooks that are only run manually by an admin as needed.

tasks - snippets of tasks that should be included in plays

roles - specific roles to be use in playbooks.
        Each role has it's own files/templates/vars

filter_plugins - Jinja filters

master.yml - This is the master playbook, consisting of all
             current group and host playbooks. Note that the
             daily cron doesn't run this, it runs even over
             playbooks that are not yet included in master.
             This playbook is usefull for making changes over
             multiple groups/hosts usually with -t (tag).

Paths

The public path on batcave01 (our control host) for everything is /srv/web/infra/ansible

The private path on batcave01 (our control host) (which is sysadmin-main accessible only) is /srv/private/ansible

In general to run any ansible playbook you will want to run:

sudo -i ansible-playbook /path/to/playbook.yml

(On batcave01, our control host)

Scheduled check-diff

Every night a cron job runs over all playbooks under playbooks/{groups}{hosts} with ansible --check --diff. A report from this is sent to sysadmin-logs. In the ideal state this report would be empty.

Idempotency

All playbooks should be idempotent. Ie, if run once they should bring the machine(s) to the desired state, and if run again N times after that they should make 0 changes (because the machine(s) are in the desired state). Please make sure your playbooks are idempotent.

Can be run anytime

When a playbook or change is checked into ansible you should assume that it could be run at ANY TIME. Always make sure the checked in state is the desired state. Always test changes when they land so they don't surprise you later.