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