mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-11-04 04:08:15 +00:00 
			
		
		
		
	Optimized setup procedure in preparation for automatic keycloak realm import
This commit is contained in:
		@@ -5,5 +5,4 @@ mode_reset:   false # Cleans up all CyMaIS files. It's necessary to run to whole
 | 
				
			|||||||
mode_test:    false # Executes test routines instead of productive routines
 | 
					mode_test:    false # Executes test routines instead of productive routines
 | 
				
			||||||
mode_update:  true  # Executes updates
 | 
					mode_update:  true  # Executes updates
 | 
				
			||||||
mode_backup:  true  # Activates the backup before the update procedure
 | 
					mode_backup:  true  # Activates the backup before the update procedure
 | 
				
			||||||
mode_setup:   false # Execute the setup and initializing procedures
 | 
					 | 
				
			||||||
mode_cleanup: false # Cleanup unused files and configurations
 | 
					mode_cleanup: false # Cleanup unused files and configurations
 | 
				
			||||||
@@ -30,6 +30,7 @@ defaults_applications:
 | 
				
			|||||||
  ## Big Blue Button
 | 
					  ## Big Blue Button
 | 
				
			||||||
  bigbluebutton:
 | 
					  bigbluebutton:
 | 
				
			||||||
    enable_greenlight:    "true"
 | 
					    enable_greenlight:    "true"
 | 
				
			||||||
 | 
					    setup:                false # Set to true in inventory file for initial setup
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ## Bluesky
 | 
					  ## Bluesky
 | 
				
			||||||
  bluesky:
 | 
					  bluesky:
 | 
				
			||||||
@@ -99,6 +100,7 @@ defaults_applications:
 | 
				
			|||||||
    administrator_username:           "{{administrator_username}}"
 | 
					    administrator_username:           "{{administrator_username}}"
 | 
				
			||||||
    public_api_activated:             False # Security hole. Can be used for spaming
 | 
					    public_api_activated:             False # Security hole. Can be used for spaming
 | 
				
			||||||
    version:                          "latest"
 | 
					    version:                          "latest"
 | 
				
			||||||
 | 
					    setup:                            false # Set true in inventory file to execute the setup and initializing procedures
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ## MariaDB
 | 
					  ## MariaDB
 | 
				
			||||||
  mariadb:
 | 
					  mariadb:
 | 
				
			||||||
@@ -111,7 +113,8 @@ defaults_applications:
 | 
				
			|||||||
  ## Mastodon
 | 
					  ## Mastodon
 | 
				
			||||||
  mastodon:
 | 
					  mastodon:
 | 
				
			||||||
    version:                          "latest"
 | 
					    version:                          "latest"
 | 
				
			||||||
    single_user_mode:                 false
 | 
					    single_user_mode:                 false                         # Set true for initial setup
 | 
				
			||||||
 | 
					    setup:                            false                         # Set true in inventory file to execute the setup and initializing procedures
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ## Matrix
 | 
					  ## Matrix
 | 
				
			||||||
  matrix:
 | 
					  matrix:
 | 
				
			||||||
@@ -123,12 +126,13 @@ defaults_applications:
 | 
				
			|||||||
      version:                        "latest"
 | 
					      version:                        "latest"
 | 
				
			||||||
    element:
 | 
					    element:
 | 
				
			||||||
      version:                        "latest"
 | 
					      version:                        "latest"
 | 
				
			||||||
 | 
					    setup:                            false                         # Set true in inventory file to execute the setup and initializing procedures
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ## Mailu
 | 
					  ## Mailu
 | 
				
			||||||
  mailu:
 | 
					  mailu:
 | 
				
			||||||
    version:                  "2024.06"
 | 
					    version:                  "2024.06"
 | 
				
			||||||
    domain:                   "{{primary_domain}}"
 | 
					    domain:                   "{{primary_domain}}"
 | 
				
			||||||
    subnet:                   "192.168.203.0/24"
 | 
					    setup:                    false                                 # Set true in inventory file to execute the setup and initializing procedures
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ## Moodle
 | 
					  ## Moodle
 | 
				
			||||||
  moodle:
 | 
					  moodle:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -44,17 +44,17 @@
 | 
				
			|||||||
- name: wait for database
 | 
					- name: wait for database
 | 
				
			||||||
  pause:
 | 
					  pause:
 | 
				
			||||||
    seconds: "{{pause_duration}}"
 | 
					    seconds: "{{pause_duration}}"
 | 
				
			||||||
  when: mode_setup | bool
 | 
					  when: appplications.bigbluebutton.setup | bool
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: create admin
 | 
					- name: create admin
 | 
				
			||||||
  command:
 | 
					  command:
 | 
				
			||||||
    cmd: docker compose exec greenlight bundle exec rake admin:create
 | 
					    cmd: docker compose exec greenlight bundle exec rake admin:create
 | 
				
			||||||
    chdir: "{{docker_compose.directories.instance}}"
 | 
					    chdir: "{{docker_compose.directories.instance}}"
 | 
				
			||||||
  when: mode_setup | bool
 | 
					  when: appplications.bigbluebutton.setup | bool
 | 
				
			||||||
  ignore_errors: true
 | 
					  ignore_errors: true
 | 
				
			||||||
  register: admin_creation_result
 | 
					  register: admin_creation_result
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: print admin user data
 | 
					- name: print admin user data
 | 
				
			||||||
  debug:
 | 
					  debug:
 | 
				
			||||||
    msg: "{{ admin_creation_result.stdout }}"
 | 
					    msg: "{{ admin_creation_result.stdout }}"
 | 
				
			||||||
  when: mode_setup | bool
 | 
					  when: appplications.bigbluebutton.setup | bool
 | 
				
			||||||
@@ -26,10 +26,10 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
- name: flush docker service
 | 
					- name: flush docker service
 | 
				
			||||||
  meta: flush_handlers
 | 
					  meta: flush_handlers
 | 
				
			||||||
  when: mode_setup |bool 
 | 
					  when: appplications.listmonk.setup |bool 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: setup routine for listmonk
 | 
					- name: setup routine for listmonk
 | 
				
			||||||
  command:
 | 
					  command:
 | 
				
			||||||
    cmd:   docker compose run -T --rm application sh -c "yes | ./listmonk --install"
 | 
					    cmd:   docker compose run -T --rm application sh -c "yes | ./listmonk --install"
 | 
				
			||||||
    chdir: "{{docker_compose.directories.instance}}"
 | 
					    chdir: "{{docker_compose.directories.instance}}"
 | 
				
			||||||
  when: mode_setup |bool 
 | 
					  when: appplications.listmonk.setup |bool 
 | 
				
			||||||
@@ -17,11 +17,11 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
- name: flush docker service
 | 
					- name: flush docker service
 | 
				
			||||||
  meta: flush_handlers
 | 
					  meta: flush_handlers
 | 
				
			||||||
  when: mode_setup |bool 
 | 
					  when: appplications.mailu.setup |bool 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: execute database migration
 | 
					- name: execute database migration
 | 
				
			||||||
  command:
 | 
					  command:
 | 
				
			||||||
    cmd: "docker compose -p mailu exec admin flask mailu admin admin {{primary_domain}} {{mailu_initial_root_password}}"
 | 
					    cmd: "docker compose -p mailu exec admin flask mailu admin admin {{primary_domain}} {{mailu_initial_root_password}}"
 | 
				
			||||||
    chdir: "{{docker_compose.directories.instance}}"
 | 
					    chdir: "{{docker_compose.directories.instance}}"
 | 
				
			||||||
  ignore_errors: true
 | 
					  ignore_errors: true
 | 
				
			||||||
  when: mode_setup |bool 
 | 
					  when: appplications.mailu.setup |bool 
 | 
				
			||||||
@@ -14,10 +14,10 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
- name: flush docker service
 | 
					- name: flush docker service
 | 
				
			||||||
  meta: flush_handlers
 | 
					  meta: flush_handlers
 | 
				
			||||||
  when: mode_setup |bool 
 | 
					  when: appplications.mastodon.setup |bool 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: setup routine for mastodon
 | 
					- name: setup routine for mastodon
 | 
				
			||||||
  command:
 | 
					  command:
 | 
				
			||||||
    cmd: "docker-compose run --rm web bundle exec rails db:migrate"
 | 
					    cmd: "docker-compose run --rm web bundle exec rails db:migrate"
 | 
				
			||||||
    chdir: "{{docker_compose.directories.instance}}"
 | 
					    chdir: "{{docker_compose.directories.instance}}"
 | 
				
			||||||
  when: mode_setup |bool 
 | 
					  when: appplications.mastodon.setup |bool 
 | 
				
			||||||
@@ -136,11 +136,11 @@
 | 
				
			|||||||
    cmd: docker compose exec -it synapse register_new_matrix_user -u {{applications.matrix.administrator_username}} -p {{matrix_admin_password}} -a -c /data/homeserver.yaml http://localhost:8008
 | 
					    cmd: docker compose exec -it synapse register_new_matrix_user -u {{applications.matrix.administrator_username}} -p {{matrix_admin_password}} -a -c /data/homeserver.yaml http://localhost:8008
 | 
				
			||||||
    chdir: "{{ docker_compose.directories.instance }}"
 | 
					    chdir: "{{ docker_compose.directories.instance }}"
 | 
				
			||||||
  ignore_errors: true
 | 
					  ignore_errors: true
 | 
				
			||||||
  when: mode_setup | bool
 | 
					  when: appplications.matrix.setup | bool
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: create chatgpt bot
 | 
					- name: create chatgpt bot
 | 
				
			||||||
  command:
 | 
					  command:
 | 
				
			||||||
    cmd: docker compose exec -it synapse register_new_matrix_user -u chatgptbot -p {{matrix_chatgpt_bridge_user_password}} -a -c /data/homeserver.yaml http://localhost:8008
 | 
					    cmd: docker compose exec -it synapse register_new_matrix_user -u chatgptbot -p {{matrix_chatgpt_bridge_user_password}} -a -c /data/homeserver.yaml http://localhost:8008
 | 
				
			||||||
    chdir: "{{ docker_compose.directories.instance }}"
 | 
					    chdir: "{{ docker_compose.directories.instance }}"
 | 
				
			||||||
  ignore_errors: true
 | 
					  ignore_errors: true
 | 
				
			||||||
  when: mode_setup | bool
 | 
					  when: appplications.matrix.setup | bool
 | 
				
			||||||
		Reference in New Issue
	
	Block a user