Du kan inte välja fler än 25 ämnen
Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
|
- ---
-
- - name: create openproject environment configuration
- template:
- src: '{{item}}.yml.j2'
- dest: '{{openproject_path}}/openproject/config/{{item}}.yml'
- with_items:
- - database
- #- configuration
- notify: restart openproject
-
- # https://community.openproject.com/projects/openproject/work_packages/26147/activity
- # - name: fix openproject bug \#26147
- # copy:
- # src: "{{ item }}.rb"
- # dest: '{{openproject_path}}/openproject/config/{{item}}.rb'
- # with_items:
- # - additional_environment
- # - additional_boot
-
- - name: set up database
- command: ./bin/rake db:create
- args:
- chdir: '{{openproject_path}}/openproject'
- become: yes
- become_user: '{{openproject_user}}'
- become_method: su
- register: rake_db_create_all
- changed_when: '"already exists" not in rake_db_create_all.stderr'
- environment:
- PATH: "{{openproject_env_path}}:{{ ansible_env.PATH }}"
- RAILS_ENV: production
- notify: restart openproject
-
- - name: generate secret token
- command: ./bin/rake generate_secret_token
- args:
- chdir: '{{openproject_path}}/openproject'
- creates: '{{openproject_path}}/openproject/config/secret_token.yml'
- become: yes
- become_user: '{{openproject_user}}'
- become_method: su
- environment:
- PATH: "{{openproject_env_path}}:{{ ansible_env.PATH }}"
- RAILS_ENV: production
- notify: restart openproject
-
- - name: migrate database
- command: ./bin/rake db:migrate
- args:
- chdir: '{{openproject_path}}/openproject'
- become: yes
- become_user: '{{openproject_user}}'
- become_method: su
- register: generate_migration
- changed_when: generate_migration.stdout != ""
- environment:
- PATH: "{{openproject_env_path}}:{{ ansible_env.PATH }}"
- RAILS_ENV: production
- notify: restart openproject
-
- - name: seed database
- command: ./bin/rake db:seed
- args:
- chdir: '{{openproject_path}}/openproject'
- become: yes
- become_user: '{{openproject_user}}'
- become_method: su
- register: seed_database
- changed_when: '"Skipping" not in seed_database.stdout'
- environment:
- PATH: "{{openproject_env_path}}:{{ ansible_env.PATH }}"
- RAILS_ENV: production
- LOCALE: "{{openproject_locale}}"
- notify: restart openproject
-
- - name: precompile assets
- command: ./bin/rake assets:precompile
- args:
- chdir: '{{openproject_path}}/openproject'
- become: yes
- become_user: '{{openproject_user}}'
- become_method: su
- async: 3600
- poll: 1
- register: precompile_assets
- changed_when: '"Writing" in seed_database.stdout'
- environment:
- PATH: "{{openproject_env_path}}:{{ ansible_env.PATH }}"
- RAILS_ENV: production
- notify: restart openproject
|