geerlingguy / geerlingguy/ansible-for-devops

Chapter 10: Provisioning of Rails app fails

Open
#429 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
9.9k
Forks
3.8k
PR merge metrics
No merged PRs in 30d

Description

If I try the example Vagrantfile of the Rails deployment example, it fails at the task "geerlingguy.passenger : Add Phusion apt repo." with the message "apt cache update failed".

Below, an excerpt of the Vagrant/Ansible output. `vagrant up` failed with the same error before. This excerpt also includes a deprecation warning for the task "geerlingguy.nodejs : Add npm_config_prefix bin directory to global $PATH".

```
$ vagrant provision

[...]

TASK [geerlingguy.nodejs : Add npm_config_prefix bin directory to global $PATH.] ***
[DEPRECATION WARNING]: evaluating 'nodejs_generate_etc_profile' as a bare
variable, this behaviour will go away and you might need to add |bool to the
expression in the future. Also see CONDITIONAL_BARE_VARS configuration toggle.
This feature will be removed in version 2.12. Deprecation warnings can be
disabled by setting deprecation_warnings=False in ansible.cfg.
ok: [default]

[...]

TASK [geerlingguy.passenger : Add Passenger apt key.] **************************
ok: [default]

TASK [geerlingguy.passenger : Add apt HTTPS capabilities.] *********************
ok: [default]

TASK [geerlingguy.passenger : Add Phusion apt repo.] ***************************
fatal: [default]: FAILED! => {"changed": false, "msg": "apt cache update failed"}

PLAY RECAP *********************************************************************
default : ok=24 changed=0 unreachable=0 failed=1 skipped=30 rescued=0 ignored=0

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
```

My operating system is Ubuntu 20.04
My VirtualBox version is Version 6.1.26

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Chapter 10 Rails deployment example and its example Vagrantfile, then run `vagrant provision` on Ubuntu 20.04 to reproduce the failure at `geerlingguy.passenger : Add Phusion apt repo.`. Inspect the complete apt output rather than the separate Node.js deprecation warning. Done means the example provisions successfully without the apt cache update failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, rails, ubuntu
Domain
backend, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.