Playbook improvement

This commit is contained in:
Christoph Haas 2020-05-03 22:33:18 +02:00
parent e7c71049c7
commit 6cda78d1ee

View file

@ -56,12 +56,14 @@
git:
repo: https://github.com/rbenv/rbenv.git
dest: /opt/debshots/.rbenv
force: yes
- name: Get rbenv-install
become: yes
become_user: debshots
git:
repo: https://github.com/rbenv/ruby-build.git
dest: /opt/debshots/.rbenv/plugins/ruby-build
force: yes
- name: enable rbenv
copy:
src: files/debshots-bash-profile
@ -73,8 +75,8 @@
# Path defaults to ansible/files
src: ../..
dest: /opt/debshots
delete: yes
rsync_opts: --exclude=.git/,--exclude=log/,--exclude=tmp/cache
#delete: yes
rsync_opts: --exclude=.git/,--exclude=log/,--exclude=tmp/cache,--exclude=storage/
- name: Build Ruby version
shell: rbenv install -v {{ruby_version}} creates=/opt/debshots/.rbenv/versions/{{ruby_version}}
@ -111,7 +113,7 @@
become_flags: "-i"
- name: Pre-render the static assets
shell: rails assets:precompile RAILS_ENV=production
shell: bundle exec rails assets:precompile RAILS_ENV=production
args:
chdir: /opt/debshots
become: yes