Go to file
Rick Elrod 6e1721ca8c 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.
Signed-off-by: Rick Elrod <relrod@redhat.com>
2018-08-27 22:56:55 +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 try and update openshift in stg only to 3.10... 2018-08-22 20:42:42 +00: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 add sshd here to attempt fixing the cloud host playbooks? 2018-05-31 18:23:39 +00:00
inventory Update list of recipients of openQA error mails 2018-08-27 15:47:43 -07: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 Copr upgrade: don't stop httpd unless packages were actually upgraded 2018-08-27 19:30:08 +00:00
roles and this should make our mail easier to read 2018-08-27 22:44:58 +00:00
scripts Add markers to highlight where to begin and end copy/pasta on oidc script. 2018-05-03 21:18:34 +00:00
tasks use the right variables for os_server registered vars, and uncomment some things 2018-07-13 22:01:00 +00:00
vars We do not want pam_sss right now on Fedora hosts, as it breaks our pam_url sudo setup. 2018-06-11 19:10:38 +00:00
.gitignore Migrate a bunch of things to roles. Thanks to misc! 2013-08-19 20:12:26 +00: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
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 test 2018-05-09 02:55:42 +00:00
master.yml Add copr-frontend-cloud.yml to master playbook 2018-08-27 15:05:10 +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.