1
0
mirror of https://github.com/krislamo/vagrant-easyredmine synced 2024-12-16 07:20:36 +00:00

add more task labels

This commit is contained in:
Mark Heiges 2018-03-20 13:04:30 -04:00
parent c44bdb5b0c
commit 95466679d8
6 changed files with 54 additions and 23 deletions

View File

@ -7,12 +7,14 @@
# Be sure the UID for the redmine user matches with the # Be sure the UID for the redmine user matches with the
# NFS server # NFS server
- file: - name: ensure NFS mount dir for Redmine files
file:
path: '{{ redmine_files_nfs_mount }}' path: '{{ redmine_files_nfs_mount }}'
state: directory state: directory
become: yes become: yes
- mount: - name: mount dir for Redmine files
mount:
name: '{{ redmine_files_nfs_mount }}' name: '{{ redmine_files_nfs_mount }}'
src: '{{ redmine_files_nfs_source }}' src: '{{ redmine_files_nfs_source }}'
fstype: nfs fstype: nfs

View File

@ -7,14 +7,15 @@
- mariadb-server - mariadb-server
- MySQL-python - MySQL-python
- name: manage MySql/MariaDB database service
- service: service:
name: '{{ redmine_db_service_provider }}' name: '{{ redmine_db_service_provider }}'
state: started state: started
enabled: yes enabled: yes
become: yes become: yes
- mysql_db: - name: create mysql/mariadb database
mysql_db:
name: '{{ redmine_db_name }}' name: '{{ redmine_db_name }}'
state: present state: present
encoding: utf8 encoding: utf8
@ -32,7 +33,8 @@
creates: '{{ _redmine_db_import_file }}' creates: '{{ _redmine_db_import_file }}'
when: do_redmine_db_import == True when: do_redmine_db_import == True
- stat: - name: check for successful database import file
stat:
path: '{{ _redmine_db_import_success }}' path: '{{ _redmine_db_import_success }}'
register: redmine_db_import_done register: redmine_db_import_done
when: do_redmine_db_import == True when: do_redmine_db_import == True
@ -47,7 +49,8 @@
register: redmine_db_import register: redmine_db_import
when: do_redmine_db_import == True and (redmine_db_import_done.stat.exists == False or redmine_db_created|changed) when: do_redmine_db_import == True and (redmine_db_import_done.stat.exists == False or redmine_db_created|changed)
- file: - name: create successful database import file
file:
path: '{{ _redmine_db_import_success }}' path: '{{ _redmine_db_import_success }}'
state: touch state: touch
when: do_redmine_db_import == True and redmine_db_import_done.stat.exists == False and redmine_db_import|success when: do_redmine_db_import == True and redmine_db_import_done.stat.exists == False and redmine_db_import|success

View File

@ -1,25 +1,29 @@
- service: - name: manage firewalld service
service:
name: firewalld name: firewalld
state: started state: started
enabled: yes enabled: yes
become: yes become: yes
- firewalld: - name: enable https in firewalld
firewalld:
service: https service: https
permanent: true permanent: true
state: enabled state: enabled
become: yes become: yes
notify: restart firewalld notify: restart firewalld
- firewalld: - name: enable http in firewalld
firewalld:
service: http service: http
permanent: true permanent: true
state: enabled state: enabled
become: yes become: yes
notify: restart firewalld notify: restart firewalld
- firewalld: - name: enable ssh rule in firewalld
firewalld:
rich_rule: 'rule service name="ssh" family="ipv4" source address="{{ item }}" accept' rich_rule: 'rule service name="ssh" family="ipv4" source address="{{ item }}" accept'
permanent: true permanent: true
state: enabled state: enabled
@ -32,7 +36,8 @@
notify: restart firewalld notify: restart firewalld
when: is_production_vm == True when: is_production_vm == True
- firewalld: - name: disable ssh service in firewalld
firewalld:
service: ssh service: ssh
permanent: true permanent: true
state: disabled state: disabled

View File

@ -1,9 +1,11 @@
- get_url: - name: set up Passenger YUM repo
get_url:
url: https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo url: https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo
dest: /etc/yum.repos.d/passenger.repo dest: /etc/yum.repos.d/passenger.repo
become: yes become: yes
- rpm_key: - name: install gpg key for Passenger YUM repo
rpm_key:
key: https://packagecloud.io/gpg.key key: https://packagecloud.io/gpg.key
become: yes become: yes
@ -12,11 +14,13 @@
# sufficient. # sufficient.
# The use of /usr/bin/env is a hack to avoid Ansible's "Consider using # The use of /usr/bin/env is a hack to avoid Ansible's "Consider using
# yum module..." warnings when it sees 'yum' as the primary command. # yum module..." warnings when it sees 'yum' as the primary command.
- command: /usr/bin/env yum -q makecache -y --disablerepo='*' --enablerepo='passenger*' - name: yum makecache
command: /usr/bin/env yum -q makecache -y --disablerepo='*' --enablerepo='passenger*'
become: yes become: yes
changed_when: False changed_when: False
- yum: - name: install epel-release
yum:
name: epel-release name: epel-release
become: yes become: yes
@ -28,7 +32,8 @@
- nginx - nginx
- passenger - passenger
- stat: - name: check for dharam pem file
stat:
path: '{{ dharam_pem_path }}' path: '{{ dharam_pem_path }}'
register: dharam_pem register: dharam_pem
@ -39,31 +44,36 @@
notify: restart nginx notify: restart nginx
when: dharam_pem.stat.exists == False when: dharam_pem.stat.exists == False
- template: - name: install easyredmine.conf to Nginx
template:
dest: '/etc/nginx/conf.d/easyredmine.conf' dest: '/etc/nginx/conf.d/easyredmine.conf'
src: easyredmine.conf.j2 src: easyredmine.conf.j2
become: yes become: yes
notify: restart nginx notify: restart nginx
- template: - name: install nginx.conf to Nginx
template:
dest: '/etc/nginx/nginx.conf' dest: '/etc/nginx/nginx.conf'
src: nginx.conf.j2 src: nginx.conf.j2
become: yes become: yes
notify: restart nginx notify: restart nginx
- template: - name: install passenger.conf to Nginx
template:
dest: /etc/nginx/conf.d/passenger.conf dest: /etc/nginx/conf.d/passenger.conf
src: passenger.conf.j2 src: passenger.conf.j2
become: yes become: yes
notify: restart nginx notify: restart nginx
- copy: - name: install TLS cert
copy:
dest: '/etc/pki/tls/certs/{{ ansible_fqdn }}.pem' dest: '/etc/pki/tls/certs/{{ ansible_fqdn }}.pem'
src: '{{ nginx_pem }}' src: '{{ nginx_pem }}'
become: yes become: yes
notify: restart nginx notify: restart nginx
- service: - name: manage Nginx service
service:
name: nginx name: nginx
state: started state: started
enabled: yes enabled: yes

View File

@ -7,6 +7,7 @@
- unzip - unzip
- rubygems - rubygems
- ruby-devel - ruby-devel
- libuuid-devel
- zlib-devel - zlib-devel
- openssl-devel - openssl-devel
- gcc-c++ - gcc-c++
@ -77,6 +78,7 @@
dest: '{{ redmine_root_dir }}/lib/tasks/ebrc_settings.rake' dest: '{{ redmine_root_dir }}/lib/tasks/ebrc_settings.rake'
src: 'ebrc_settings.rake' src: 'ebrc_settings.rake'
owner: '{{ redmine_owner }}' owner: '{{ redmine_owner }}'
when: do_redmine_installer == True
become: yes become: yes
- name: install ebrc_tasks.rake - name: install ebrc_tasks.rake
@ -84,6 +86,7 @@
dest: '{{ redmine_root_dir }}/lib/tasks/ebrc_tasks.rake' dest: '{{ redmine_root_dir }}/lib/tasks/ebrc_tasks.rake'
src: 'ebrc_tasks.rake' src: 'ebrc_tasks.rake'
owner: '{{ redmine_owner }}' owner: '{{ redmine_owner }}'
when: do_redmine_installer == True
become: yes become: yes
- name: install additional_environment.rb - name: install additional_environment.rb
@ -92,6 +95,7 @@
src: 'additional_environment.rb' src: 'additional_environment.rb'
owner: '{{ redmine_owner }}' owner: '{{ redmine_owner }}'
become: yes become: yes
when: do_redmine_installer == True
notify: restart nginx notify: restart nginx
- name: create public/assets dir - name: create public/assets dir
@ -100,6 +104,7 @@
state: directory state: directory
owner: '{{ redmine_owner }}' owner: '{{ redmine_owner }}'
mode: 0755 mode: 0755
when: do_redmine_installer == True
become: yes become: yes
- name: install custom login background image - name: install custom login background image
@ -110,6 +115,7 @@
with_items: with_items:
- '{{ redmine_root_dir }}/public/plugin_assets/easy_extensions/images/login-bg.jpg' - '{{ redmine_root_dir }}/public/plugin_assets/easy_extensions/images/login-bg.jpg'
- '{{ redmine_root_dir }}/public/assets/{{ easyredmine_login_bg_img }}' - '{{ redmine_root_dir }}/public/assets/{{ easyredmine_login_bg_img }}'
when: do_redmine_installer == True
become: yes become: yes
- name: create maintenance dir - name: create maintenance dir
@ -130,6 +136,7 @@
file: file:
path: '{{ redmine_root_dir }}/config' path: '{{ redmine_root_dir }}/config'
mode: 0770 mode: 0770
when: do_redmine_installer == True
- name: Configuring Redmine with eupath preferences - name: Configuring Redmine with eupath preferences
command: 'rake redmine:ebrc_settings RAILS_ENV=production' command: 'rake redmine:ebrc_settings RAILS_ENV=production'
@ -144,6 +151,7 @@
minute: "*/15" minute: "*/15"
job: 'cd {{ redmine_root_dir }} && {{ rvm1_install_path }}/wrappers/default/bundle exec rake easyproject:scheduler:run_tasks RAILS_ENV=production > /dev/null' job: 'cd {{ redmine_root_dir }} && {{ rvm1_install_path }}/wrappers/default/bundle exec rake easyproject:scheduler:run_tasks RAILS_ENV=production > /dev/null'
user: '{{ redmine_owner }}' user: '{{ redmine_owner }}'
when: do_redmine_installer == True
become: yes become: yes
- name: add redmine IMAP fetch script - name: add redmine IMAP fetch script
@ -151,6 +159,7 @@
dest: '{{ redmine_root_dir }}/script/redmine_receive_imap' dest: '{{ redmine_root_dir }}/script/redmine_receive_imap'
src: redmine_receive_imap.j2 src: redmine_receive_imap.j2
mode: 0750 mode: 0750
when: do_redmine_installer == True
become: no become: no
- name: add redmine repository fetch script - name: add redmine repository fetch script
@ -158,6 +167,7 @@
dest: '{{ redmine_root_dir }}/script/redmine_fetch_changesets' dest: '{{ redmine_root_dir }}/script/redmine_fetch_changesets'
src: redmine_fetch_changesets.j2 src: redmine_fetch_changesets.j2
mode: 0750 mode: 0750
when: do_redmine_installer == True
become: no become: no
- name: adding redmine_receive_imap crontab - name: adding redmine_receive_imap crontab

View File

@ -27,7 +27,8 @@
- screen - screen
- mlocate - mlocate
- service: - name: manage sendmail service
service:
name: sendmail name: sendmail
state: started state: started
enabled: yes enabled: yes