{"id":19806019,"url":"https://github.com/cycloidio/ansible-symfony2","last_synced_at":"2026-02-05T04:33:16.117Z","repository":{"id":83786328,"uuid":"59466181","full_name":"cycloidio/ansible-symfony2","owner":"cycloidio","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-08T10:08:45.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-09T04:03:46.787Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cycloidio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-23T08:38:23.000Z","updated_at":"2023-06-01T09:18:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"d0b9d9eb-34d7-4bfb-a693-3ee7a6ceff31","html_url":"https://github.com/cycloidio/ansible-symfony2","commit_stats":{"total_commits":41,"total_committers":7,"mean_commits":5.857142857142857,"dds":0.4878048780487805,"last_synced_commit":"16c08f81ce37dfa8a26c1ca84f99367e54b27bfb"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cycloidio/ansible-symfony2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycloidio%2Fansible-symfony2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycloidio%2Fansible-symfony2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycloidio%2Fansible-symfony2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycloidio%2Fansible-symfony2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cycloidio","download_url":"https://codeload.github.com/cycloidio/ansible-symfony2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycloidio%2Fansible-symfony2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29111887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T03:44:17.043Z","status":"ssl_error","status_checked_at":"2026-02-05T03:44:12.077Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T09:06:10.401Z","updated_at":"2026-02-05T04:33:16.103Z","avatar_url":"https://github.com/cycloidio.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"ansible-symfony2\n================\n\nA set of [Ansible](http://docs.ansible.com/) tasks for deploying PHP applications developed using the Symfony framework onto *nix servers in a \"Capistrano\" fashion (releases, shared, current-\u003ereleases/X).\n\nThis role is more or less just a collection of the most common post-installation setup tasks (i.e. getting a Composer executable, installing dependencies and autoloader, perform cache warming, deploy migrations etc). It does not itself deal with setting up the directory structures or getting files onto your servers - that part is handled by the more generic `cycloid.deployment` role.\n\nThe way this is implemented is by defining a couple of the `ansistrano_(before|after)_X` vars \n\nRequirements\n------------\n\nDue to shortcomings in the current version of Ansible, it __is__ a requirement that the `cycloid.symfony2` and `cycloid.deployment` share the same parent directory.\n\nRole Variables\n--------------\n\nThe `defaults` vars declared in this module:\n\n```YAML\nsymfony_env: prod\nsymfony_php_path: php # The PHP executable to use for all command line tasks\n# symfony_deployment_subdir: If clients have a special path in their release folder.\n#\n# e.g. if symfony_deployment_subdir is 'toto' then you'll be looking for:\n# releases/$VERSION/toto/composer.json etc instead of:\n# releases/$VERSION/composer.json\nsymfony_deployment_subdir: \"\"\n\nsymfony_console_path: app/console\nsymfony_run_composer: true\nsymfony_composer_path: \"{{ ansistrano_deploy_to }}/composer.phar\"\nsymfony_composer_options: '--no-dev --optimize-autoloader --no-interaction'\nsymfony_composer_self_update: true # Always attempt a composer self-update\n\nsymfony_run_assets_install: true\nsymfony_assets_options: '--no-interaction'\n\nsymfony_run_assetic_dump: true\nsymfony_assetic_options: '--no-interaction'\n\nsymfony_run_cache_clear_and_warmup: true\nsymfony_cache_options: ''\n\n###############################################################################\nsymfony_run_doctrine_migrations: false\nsymfony_doctrine_options: '--no-interaction'\nsymfony_run_doctrine_runonce: false\nsymfony_run_mongodb_schema_update: false\nsymfony_mongodb_options: ''\n```\n\nNote about ORM/ODM schema migrations\n------------------------------------\n\nDatabase schema migrations can generally NOT be run in parallel across multiple hosts! For this reason, the `symfony_run_doctrine_migrations` and `symfony_run_mongodb_schema_update` options both come turned off by default.\n\nIn order to get around the parallel exection, you can do the following:\n\n1. Specify your own `ansistrano_before_symlink_tasks_file`, perhaps with the one in this project as a template (look in ansible-symfony2/config/steps/).\n2. Pick one of the following approaches:\n  - (a) Organize hosts into groups such that the task will run on only the _first_ host in some group:\n    `when: groups['www-production'][0] == inventory_hostname`\n  - (b) Use the `run_once: true` perhaps with `delegate_to: some_primary_host` ([Docs: Playbook delegation](http://docs.ansible.com/ansible/playbooks_delegation.html#run-once))\n  - (c) Use the current config/steps/doctrine.yml (runned after) with the symfony_run_doctrine_runonce: true\n\nExample playbook\n----------------\n\nAs a bare minimum, you probably need to declare the `ansistrano_deploy_from` and `deployment_deploy_to` variables in your play. Deployment defaults to using rsync from a local directory (again, see the [deployment docs](https://github.com/deployment/deploy)).\n\nLet's assume there is a `my-app-infrastructure/deploy.yml`:\n```YAML\n---\n- hosts: all\n  gather_facts: false\n  vars:\n    ansistrano_deploy_from: ../my-project-checkout\n    ansistrano_deploy_to: /home/app-user/my-project-deploy/\n    ansistrano_before_symlink_tasks_file: \"{{playbook_dir}}/config/app_specific_setup.yml\"\n  roles:\n    - cycloid.symfony2\n```\n\nThis playbook should be executed like any other, i.e. `ansible-playbook -i some_hosts_file deploy.yml`.\n\nIt probably makes sense to keep your one-off system prep tasks in a separate playbook, e.g. `my-app-infrastructure/setup.yml`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcycloidio%2Fansible-symfony2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcycloidio%2Fansible-symfony2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcycloidio%2Fansible-symfony2/lists"}