Skip to content

Try to fix chapter 10 deployment example (#429) #519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
name: Scripts
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- test_script: collection
Expand All @@ -33,13 +34,12 @@ jobs:
name: Playbooks
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# TODO: This started failing on GitHub Actions.
# See: https://github.com/geerlingguy/ansible-for-devops/issues/429
# - playbook: deployments.yml
# distro: ubuntu2004
# test_idempotence: false
- playbook: deployments.yml
distro: ubuntu2004
test_idempotence: false

# TODO: Not easy to test in CI at this time.
# - playbook: deployments-balancer.yml
Expand Down
8 changes: 6 additions & 2 deletions deployments/playbooks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
- geerlingguy.passenger

tasks:
- name: Allow Git invocations in repositories owned by other users.
git_config:
name: safe.directory
scope: global
value: '*'

- name: Ensure demo application is at correct release.
git:
repo: https://github.com/geerlingguy/demo-rails-app.git
Expand All @@ -18,8 +24,6 @@
force: true
register: app_updated
notify: restart nginx
become: true
become_user: "{{ app_user }}"

- name: Ensure secrets file is present.
template:
Expand Down
8 changes: 0 additions & 8 deletions deployments/playbooks/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,3 @@
- libreadline-dev
- tzdata
state: present

- name: Ensure app directory exists and is writeable.
file:
path: "{{ app_directory }}"
state: directory
owner: "{{ app_user }}"
group: "{{ app_user }}"
mode: 0755
10 changes: 8 additions & 2 deletions deployments/playbooks/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@ passenger_ruby: /usr/local/bin/ruby

# Variables for Ruby installation.
ruby_install_from_source: true
ruby_download_url: https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.6.tar.gz
ruby_version: 2.7.6
ruby_download_url: https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.0.tar.gz
ruby_version: 2.6.0
ruby_install_bundler: false
ruby_install_gems:
- name: bundler
version: 2.1.4
user_install: false
ruby_install_gems_user: root

# Variables for Node.js installation.
nodejs_install_npm_user: root