Go to file
Stephen Smoogen ca4e65efce remove some jenkins lines 2018-04-26 15:40:14 +00:00
callback_plugins First round of porting callbacks to work with Ansible-2.4.0 2017-10-16 15:53:18 +00:00
files This is needed to authenticate with koji stg 2018-04-26 15:10:28 +02:00
filter_plugins Give staging fedmsg also prod policy since we have prod->stg message flow 2018-04-17 02:24:14 +02:00
handlers shelve darkserver 2018-04-10 20:36:40 +00:00
inventory remove some jenkins lines 2018-04-26 15:40:14 +00:00
library Look, our very own copy of nova_compute module. We cannot move to os_server because that requires python-shade, which is not packaged for RHEL7. When/if we move batcave01 to fedora we can drop this. 2017-11-07 18:32:12 +00:00
playbooks Missing a colon in the file path 2018-04-26 15:02:13 +02:00
roles copr-frontend: install a newer version of xstatic-jquery-ui-common 2018-04-26 17:21:56 +02:00
scripts using db-qa02.qa for public resultsdb dumps 2018-01-15 14:31:45 +00:00
tasks Use the service account koji token in buildvm to authenticate 2018-04-09 20:42:26 +02:00
vars Add atop to global_pkgs_inst 2018-02-28 18:29:14 +00:00
.gitignore Migrate a bunch of things to roles. Thanks to misc! 2013-08-19 20:12:26 +00:00
CONVENTIONS Fix typo in doc 2016-04-04 14:33:21 +00:00
README Undo test 2016-11-01 09:42:09 +00:00
README.cloud remove some jenkins lines 2018-04-26 15:40:14 +00:00
TODO restructure virt to be more like cloud creation 2013-05-03 16:56:38 +00:00
master.yml Shelve summershum 2018-04-10 21:39:56 +00:00

README

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