Fedora Infrastructure Ansible Repository
Find a file
2015-11-21 17:38:46 +00:00
callback_plugins Remove the failed flag on the fedmsg callback. It was born of confusion during the batcave migration. 2015-09-26 15:56:29 +00:00
files Add a playbook implementation of list-vm's per host 2015-11-20 23:04:17 +00:00
filter_plugins Remove runner from the imports as it's not needed 2015-10-08 17:25:51 +00:00
handlers Kill old references to fcomm-cache-worker. 2015-11-19 18:47:43 +00:00
inventory And another one 2015-11-20 20:32:53 +00:00
library Fix other references to cloud net ids 2015-06-05 12:01:09 +00:00
lookup_plugins missed some openshift bits for OSBS in the initial commit 2015-08-05 16:06:21 +00:00
playbooks Monitor fedmsg-hub on packages03 with collectd. 2015-11-21 01:41:14 +00:00
roles Wow, not sure how this even worked before. ;( Also, disable pkgdb sync in stg for now as it's broken and spamming 2015-11-21 17:38:46 +00:00
scripts improving functionality 2015-11-18 04:00:07 +00:00
tasks Just drop this for now until we can figure out a good way to do it. 2015-11-16 19:55:24 +00:00
vars Switch twisted rhel6 buildbots to fedora23 2015-11-16 19:22:14 +00:00
.gitignore Migrate a bunch of things to roles. Thanks to misc! 2013-08-19 20:12:26 +00:00
CONVENTIONS Clean up some more old syntax 2014-01-08 17:42:18 +00:00
master.yml Update master playbook a bit 2015-11-18 20:39:18 +00:00
README Whitespace, testing. 2015-09-25 18:18:42 +00:00
README.cloud Document the different cloud instance sizes available in the README 2015-08-13 03:46:10 +02:00
TODO restructure virt to be more like cloud creation 2013-05-03 16:56:38 +00:00

== 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 ==

public path for everything is:

 /srv/web/infra/ansible

private path - 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

== Scheduled check-diff ==

Every night a cron job runs over all playbooks under playbooks/{groups}{hosts}
with the ansible --check --diff options. 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.