Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
ansible [2018/04/16 16:46] – [Table] derchrisansible [2022/09/04 20:15] kunsi
Line 4: Line 4:
  
 <code> <code>
-git clone git@mng.ber.c3voc.de:cm+git clone git@git.c3voc.de:cm 
 +cd ansible
 vim README.md vim README.md
 </code> </code>
  
-**Public version of this repository:** https://github.com/voc/cm/ +**Public version of this repository:** [[https://github.com/voc/cm/tree/master/ansible#readme|https://github.com/voc/cm/ansible/]] 
 + 
 +<panel type="danger" title="Outdated">This page is outdated. As of 2022-08-01, c3voc uses bundlewrap to deploy the room setups. Please follow the README.md in the git repository to get started, or ask in #voc-lounge on hackint for support. This documentation will get adjusted soon.</panel> 
  
 == README.md == README.md
Line 14: Line 18:
 === Installation === Installation
  
-To manage hosts with [[http://ansible.com/|ansible]]  you need to install ''ansible'' 1.on your machine.+To manage hosts with [[http://ansible.com/|ansible]] you need to install ansible > 2.on your machine. 
 See https://docs.ansible.com/ansible/intro_installation.html for instructions See https://docs.ansible.com/ansible/intro_installation.html for instructions
 +
 +
 === Usage === Usage
  
Line 21: Line 28:
  
  
-  ansible-playbook -i event -l mixers site.yml --syntax-check+  ansible-playbook -i inventory/event -l mixers site.yml --syntax-check
  
 Basic ''ansible'' call to deploy new config to a specific host. Basic ''ansible'' call to deploy new config to a specific host.
  
-  ./ansible-playbook-keepass -u root -i event -l 192.168.122.1 site.yml+  ./ansible-playbook-keepass -u root -i inventory/event -l 192.168.122.1 site.yml
  
 Basic ''ansible'' call to deploy new config to a set of hosts on an event. Basic ''ansible'' call to deploy new config to a set of hosts on an event.
  
-  ./ansible-playbook-keepass -u voc --sudo -i event -l saal1 site.yml+  ./ansible-playbook-keepass -u voc --become --become-method=sudo -i inventory/event -l saal1 site.yml
      
      
Line 52: Line 59:
 * make sure you have two network interfaces configured with names ''pbl'' (public) and ''int'' (internal) * make sure you have two network interfaces configured with names ''pbl'' (public) and ''int'' (internal)
 * run ansible to deploy config * run ansible to deploy config
 +
  
 ==== monitoring.lan.c3voc.de ==== monitoring.lan.c3voc.de
Line 73: Line 81:
 === Overview === Overview
  
-^ Tag                       ^ Result                                                                       +^ Tag                       ^ Result                                                                                                    
-| config                    | Only run configuration tasks like changing config files and reload daemon.   +| config                    | Only run configuration tasks like changing config files and reload daemon.                                
-| install                   | Run all needed tasks which needs to be run on a new and fresh installation.  +| install                   | Run all needed tasks which needs to be run on a new and fresh installation.                               
-| deploy_website            | Deploy (git pull) streaming website and flush fcgi cache.                    +| deploy_website            | Deploy (git pull) streaming website and flush fcgi cache.                                                 
-| nginx                     | Run all nginx tasks.                                                         +| nginx                     | Run all nginx tasks.                                                                                      
-| icecast                   | Run all icecast tasks.                                                       +| icecast                   | Run all icecast tasks.                                                                                    
-| haproxy                   | Run all haproxy tasks.                                                       +| haproxy                   | Run all haproxy tasks.                                                                                    
-| ssh(d)                    | Run all sshd tasks.                                                          +| ssh(d)                    | Run all sshd tasks.                                                                                       
-| user                      | Manage user.                                                                 +| user                      | Manage user.                                                                                              
-| encodermode               Change from sd-dvswitch to hd-direct or to hd-voctomix                       +| encodermode               Deploys event related config. Also can be used to change from sd-dvswitch to hd-direct or to hd-voctomix  
-| voctomix                  | Updates/regenerates all voctomix related files on the cube                   +| voctomix                  | Updates/regenerates all voctomix related files on the cube                                                
-| artwork                   | Deploy artwork (background, pause loop)                                      +| artwork                   | Deploy artwork (background, pause loop)                                                                   
-| ''checkout'' or ''pull''  | Get update subversion or git repository versions.                            |+| ''checkout'' or ''pull''  | Get update subversion or git repository versions.                                                         | 
 +| gpg                       | Update apt gpg key                                                                                        |
 === Useful combinations === Useful combinations
  
   * Change ''nginx'' config on all relays: ''<nowiki>--tags nginx,config</nowiki>''   * Change ''nginx'' config on all relays: ''<nowiki>--tags nginx,config</nowiki>''
   * Deploy only streaming website: ''<nowiki>--tags deploy_website</nowiki>''   * Deploy only streaming website: ''<nowiki>--tags deploy_website</nowiki>''
-    * e.g.  +    * e.g. `./ansible-playbook-keepass --tags deploy_website -i event loadbalancers.yml`
-  ./ansible-playbook-keepass --tags deploy_website -i event loadbalancers.yml+
  
   * Deploy encoder setting for a conference   * Deploy encoder setting for a conference
     * edit group_vars/all  and group_vars/saal*     * edit group_vars/all  and group_vars/saal*
-    * <code>./ansible-playbook-keepass -i event -u voc --become --become-method=sudo --limit encoder1.lan.c3voc.de --tags encodermode site.yml</code> +    *    `./ansible-playbook-keepass -i inventory/event --limit encoder1.lan.c3voc.de --tags encodermode site.yml` 
-    *  or <code>./ansible-playbook-keepass -i event -u voc --become --become-method=sudo --limit encoder1.lan.c3voc.de --tags voctomix site.yml</code> +    * or `./ansible-playbook-keepass -i inventory/event --limit encoder1.lan.c3voc.de --tags voctomix site.yml` 
-    * or <code>./ansible-playbook-keepass -i event -u voc --become --become-method=sudo -l saal5 --tags voctomix </code>+    * or `./ansible-playbook-keepass -i inventory/event  -l saal5 --tags voctomix site.yml`
    
   * Debug without rerunning working tasks   * Debug without rerunning working tasks
-    * <code>KEEPASS="${KEEPASS}" KEEPASS_PW="${KEEPASS_PW}" python2 `which ansible-playbook` -i event -u voc --become --become-method=sudo -l saal5 --tags voctomix --start-at-task="encoder : create recording script"</code>+    * ```KEEPASS="${KEEPASS}" KEEPASS_PW="${KEEPASS_PW}" python3 `which ansible-playbook` -i inventory/event -l saal5 --tags voctomix --start-at-task="encoder : create recording script" encoder.yml```
  
  
Line 186: Line 194:
 Which one should be running can be configured with the ''encodermode'' variable in the ''saal[1-6]'' groupvars file. Which one should be running can be configured with the ''encodermode'' variable in the ''saal[1-6]'' groupvars file.
 Changing that and running ansible with the encodermode-Tag (or without any tag) stops the unnecessary Tasks and starts the required ones. It allows transitioning between dvswitch and voctomix within a minute. Changing that and running ansible with the encodermode-Tag (or without any tag) stops the unnecessary Tasks and starts the required ones. It allows transitioning between dvswitch and voctomix within a minute.
 +
 +
 +=== Other
 +
 +
  • ansible.txt
  • Last modified: 2022/12/27 20:34
  • by kunsi