--- - name: install wikimedia hosts: all become: true tasks: - name: set LocalSettings.php blockinfile: path: /root/LocalSettings.php state: present create: true owner: "root" group: "root" mode: "0666" marker: "{mark}" marker_begin: " "$wgResourceBasePath/resources/assets/change-your-logo.svg", 'icon' => "$wgResourceBasePath/resources/assets/change-your-logo.svg", ]; ## UPO means: this is also a user preference option $wgEnableEmail = false; $wgEnableUserEmail = true; # UPO $wgEmergencyContact = ""; $wgPasswordSender = ""; $wgEnotifUserTalk = false; # UPO $wgEnotifWatchlist = false; # UPO $wgEmailAuthentication = true; ## Database settings $wgDBtype = "mysql"; $wgDBserver = "mariadb"; $wgDBname = "my_wiki"; $wgDBuser = "wikiuser"; $wgDBpassword = "{{ sqlpwd }}"; # MySQL specific settings $wgDBprefix = ""; $wgDBssl = false; # MySQL table options to use during installation or update $wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary"; # Shared database table # This has no effect unless $wgSharedDB is also set. $wgSharedTables[] = "actor"; ## Shared memory settings $wgMainCacheType = CACHE_ACCEL; $wgMemCachedServers = []; ## To enable image uploads, make sure the 'images' directory ## is writable, then set this to true: $wgEnableUploads = true; $wgUseImageMagick = true; $wgImageMagickConvertCommand = "/usr/bin/convert"; $wgUseInstantCommons = false; $wgPingback = false; $wgLanguageCode = "en"; $wgLocaltimezone = "UTC"; ## Set $wgCacheDirectory to a writable directory on the web server ## to make your wiki go slightly faster. The directory should not ## be publicly accessible from the web. #$wgCacheDirectory = "$IP/cache"; $wgSecretKey = "68876c5ab7953361002cc0afd46371202badcf9aa4241976eafe44ac3e330e09"; # Changing this will log out all existing sessions. $wgAuthenticationTokenVersion = "1"; # Site upgrade key. Must be set to a string (default provided) to turn on the # web installer while LocalSettings.php is in place $wgUpgradeKey = "76691fca3e2c1fff"; ## For attaching licensing metadata to pages, and displaying an ## appropriate copyright notice / icon. GNU Free Documentation ## License and Creative Commons licenses are supported so far. $wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright $wgRightsUrl = ""; $wgRightsText = ""; $wgRightsIcon = ""; # Path to the GNU diff3 utility. Used for conflict resolution. $wgDiff3 = "/usr/bin/diff3"; $wgDefaultSkin = "monobook"; wfLoadSkin( 'MinervaNeue' ); wfLoadSkin( 'MonoBook' ); wfLoadSkin( 'Timeless' ); wfLoadSkin( 'Vector' ); - name: remove other files include_tasks: yaml_sub/myrepo_clean.yaml - name: update file myrepo.repo import_tasks: yaml_sub/myrepo_data.yaml - name: install client ansible.builtin.dnf: name: "http://10.10.0.3/cmk/check_mk/agents/check-mk-agent-2.2.0p24-1.noarch.rpm" state: present update_cache: true skip_broken: true nobest: false allowerasing: true disable_gpg_check: true - name: remove other files include_tasks: yaml_sub/install_docker.yaml - name: Create network WikiNet community.docker.docker_network: name: WikiNet - name: Create volume maria_db community.docker.docker_volume: name: maria_db state: present - name: Create mariab container community.docker.docker_container: name: mariadb image: mariadb state: started recreate: no restart_policy: always env: MARIADB_DATABASE: "my_wiki" MARIADB_USER: "wikiuser" MARIADB_PASSWORD: "{{ sqlpwd }}" MYSQL_RANDOM_ROOT_PASSWORD: "yes" MYSQL_ROOT_HOST: '%' networks: - name: WikiNet comparisons: networks: strict volumes: - "maria_db:/var/lib/mysql" - name: Create volume images community.docker.docker_volume: name: wiki_images state: present - name: Create wiki container community.docker.docker_container: name: wiki image: mediawiki state: started recreate: no restart_policy: always published_ports: - "80:80/tcp" networks: - name: WikiNet - name: bridge comparisons: networks: strict volumes: - "wiki_images:/var/www/html/images" - "/root/LocalSettings.php:/var/www/html/LocalSettings.php"