сбой vagrant при запуске ANSIBLE playbook на stouts.celery - PullRequest
0 голосов
/ 12 октября 2019

Я использую виртуальный ящик с виртуальной машины. Я делаю vagrant и запускаю машину. Он отлично работает и говорит мне сделать Бродячее обеспечение . Когда я выполняю бродячее обеспечение , оно запускается и выдает мне следующее сообщение (ошибка в последних строках):

 default: Running provisioner: ansible...
Vagrant has automatically selected the compatibility mode '2.0'
according to the Ansible version installed (2.8.5).

Alternatively, the compatibility mode can be specified in your Vagrantfile:
https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode

    default: Running ansible-playbook...

PLAY [Configure application server] ********************************************

TASK [Gathering Facts] *********************************************************
ok: [vagrant]

TASK [kamaln7.swapfile : Write swapfile] ***************************************
ok: [vagrant]

TASK [kamaln7.swapfile : Set swapfile permissions] *****************************
ok: [vagrant]

TASK [kamaln7.swapfile : Create swapfile] **************************************
skipping: [vagrant]

TASK [kamaln7.swapfile : Enable swapfile] **************************************
skipping: [vagrant]

TASK [kamaln7.swapfile : Add swapfile to /etc/fstab] ***************************
ok: [vagrant]

TASK [kamaln7.swapfile : Configure vm.swappiness] ******************************
skipping: [vagrant]

TASK [kamaln7.swapfile : Configure vm.vfs_cache_pressure] **********************
skipping: [vagrant]

TASK [Stouts.deploy : Make sure the deploy group are present] ******************
ok: [vagrant]

TASK [Stouts.deploy : Make sure the deploy user are present] *******************
ok: [vagrant]

.
. 
. 
. 
.  
. 
. 
. 
. "SKIPPED DUE TO STACKOVERFLOW WORD LIMITS"
. 
.     
. 
. 
. 
.     
. 
. 

TASK [jdauphant.nginx : Remove unwanted conf] **********************************

TASK [jdauphant.nginx : Remove unwanted snippets] ******************************

TASK [jdauphant.nginx : Remove unwanted auth_basic_files] **********************

TASK [jdauphant.nginx : Copy the nginx configuration file] *********************
ok: [vagrant]

TASK [jdauphant.nginx : Ensure auth_basic files created] ***********************

TASK [jdauphant.nginx : Create the configurations for sites] *******************
ok: [vagrant] => (item={'value': [u'listen 80', u'charset utf-8', u'server_tokens off', u'server_name petalandstem.local www.petalandstem.local', u'access_log /home/vagrant/petalandstem/log/nginx-access.log', u'error_log /home/vagrant/petalandstem/log/nginx-error.log', u'client_max_body_size 10M', u'location / { proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_set_header Connection ""; proxy_http_version 1.1;\nproxy_pass http://petalandstem_webapp; }'], 'key': u'project_webapp'})
ok: [vagrant] => (item={'value': [u'listen 80', u'charset utf-8', u'server_tokens off', u'server_name api.petalandstem.local', u'access_log /home/vagrant/petalandstem/log/nginx-access.log', u'error_log /home/vagrant/petalandstem/log/nginx-error.log', u'client_max_body_size 10M', u'location /static { alias /home/vagrant/petalandstem/src/backend/static; access_log off; expires max; }', u'location / { proxy_read_timeout 300; proxy_connect_timeout 300; proxy_redirect off; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://petalandstem_api; }'], 'key': u'project_api'})
skipping: [vagrant] => (item={'value': [u'listen 8080', u'server_name api.petalandstem.local', u'charset utf-8', u'location / { proxy_pass http://localhost:8080; proxy_set_header Host $host; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; }'], 'key': u'project_stuff'})
ok: [vagrant] => (item={'value': [u'listen 80 default_server', u'server_name _', u'return 444'], 'key': u'project_block_ip'})

TASK [jdauphant.nginx : Create links for sites-enabled] ************************
ok: [vagrant] => (item={'value': [u'listen 80', u'charset utf-8', u'server_tokens off', u'server_name petalandstem.local www.petalandstem.local', u'access_log /home/vagrant/petalandstem/log/nginx-access.log', u'error_log /home/vagrant/petalandstem/log/nginx-error.log', u'client_max_body_size 10M', u'location / { proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_set_header Connection ""; proxy_http_version 1.1;\nproxy_pass http://petalandstem_webapp; }'], 'key': u'project_webapp'})
ok: [vagrant] => (item={'value': [u'listen 80', u'charset utf-8', u'server_tokens off', u'server_name api.petalandstem.local', u'access_log /home/vagrant/petalandstem/log/nginx-access.log', u'error_log /home/vagrant/petalandstem/log/nginx-error.log', u'client_max_body_size 10M', u'location /static { alias /home/vagrant/petalandstem/src/backend/static; access_log off; expires max; }', u'location / { proxy_read_timeout 300; proxy_connect_timeout 300; proxy_redirect off; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://petalandstem_api; }'], 'key': u'project_api'})
skipping: [vagrant] => (item={'value': [u'listen 8080', u'server_name api.petalandstem.local', u'charset utf-8', u'location / { proxy_pass http://localhost:8080; proxy_set_header Host $host; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; }'], 'key': u'project_stuff'})
ok: [vagrant] => (item={'value': [u'listen 80 default_server', u'server_name _', u'return 444'], 'key': u'project_block_ip'})

TASK [jdauphant.nginx : Create the configurations for independent config file] ***
ok: [vagrant] => (item={'value': [u'gzip on', u'gzip_disable "msie6"', u'gzip_vary on', u'gzip_proxied any', u'gzip_comp_level 6', u'gzip_buffers 16 8k', u'gzip_http_version 1.1', u'gzip_min_length 1000', u'gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript image/png image/gif image/jpeg image/x-icon image/bmp'], 'key': u'gzip'})
ok: [vagrant] => (item={'value': [u'upstream petalandstem_webapp  { server localhost:3000; keepalive 64; }', u'upstream petalandstem_api  { server unix:/home/vagrant/petalandstem/run/petalandstem.sock fail_timeout=0; }'], 'key': u'upstream'})

TASK [jdauphant.nginx : Create configuration snippets] *************************

TASK [jdauphant.nginx : Create the configurations for independent config file for streams] ***

TASK [jdauphant.nginx : Create configuration for modules] **********************

TASK [jdauphant.nginx : Create links for modules-enabled] **********************

TASK [jdauphant.nginx : include_tasks] *****************************************
skipping: [vagrant]

TASK [jdauphant.nginx : include_tasks] *****************************************
skipping: [vagrant]

TASK [jdauphant.nginx : Start the nginx service] *******************************
ok: [vagrant]

TASK [gunicorn : Install gunicorn] *********************************************
ok: [vagrant]

TASK [gunicorn : Install gunicorn config] **************************************
ok: [vagrant]

TASK [geerlingguy.nodejs : Set up the Nodesource RPM directory for Node.js > 0.10.] ***
skipping: [vagrant]

TASK [geerlingguy.nodejs : Set up the Nodesource RPM variable for Node.js == 0.10.] ***
skipping: [vagrant]

TASK [geerlingguy.nodejs : Import Nodesource RPM key (CentOS < 7).] ************
skipping: [vagrant]

TASK [geerlingguy.nodejs : Import Nodesource RPM key (CentOS 7+)..] ************
skipping: [vagrant]

TASK [geerlingguy.nodejs : Add Nodesource repositories for Node.js (CentOS < 7).] ***
skipping: [vagrant]

TASK [geerlingguy.nodejs : Add Nodesource repositories for Node.js (CentOS 7+).] ***
skipping: [vagrant]

TASK [geerlingguy.nodejs : Ensure Node.js and npm are installed.] **************
skipping: [vagrant]

TASK [geerlingguy.nodejs : Ensure apt-transport-https is installed.] ***********
ok: [vagrant]

TASK [geerlingguy.nodejs : Add Nodesource apt key.] ****************************
ok: [vagrant]

TASK [geerlingguy.nodejs : Add NodeSource repositories for Node.js.] ***********
ok: [vagrant] => (item=deb https://deb.nodesource.com/node_9.x xenial main)
ok: [vagrant] => (item=deb-src https://deb.nodesource.com/node_9.x xenial main)

TASK [geerlingguy.nodejs : Update apt cache if repo was added.] ****************
skipping: [vagrant]

TASK [geerlingguy.nodejs : Ensure Node.js and npm are installed.] **************
ok: [vagrant]

TASK [geerlingguy.nodejs : Define nodejs_install_npm_user] *********************
ok: [vagrant]

TASK [geerlingguy.nodejs : Create npm global directory] ************************
ok: [vagrant]

TASK [geerlingguy.nodejs : Add npm_config_prefix bin directory to global $PATH.] ***
ok: [vagrant]

TASK [geerlingguy.nodejs : Ensure npm global packages are installed.] **********
ok: [vagrant] => (item={u'version': u'^6.0.0', u'name': u'babel-cli'})

TASK [geerlingguy.nodejs : Install packages defined in a given package.json.] ***
skipping: [vagrant]

TASK [ocha.yarn : Install YARN YUM repo.] **************************************
skipping: [vagrant]

TASK [ocha.yarn : Install NodeJS package for yarn dependency] ******************
skipping: [vagrant]

TASK [ocha.yarn : Make sure HTTPS is supported by apt] *************************
ok: [vagrant]

TASK [ocha.yarn : Import YARN APT key] *****************************************
ok: [vagrant]

TASK [ocha.yarn : Install YARN APT repo] ***************************************
ok: [vagrant]

TASK [ocha.yarn : Install YARN package manager] ********************************
ok: [vagrant]

TASK [Stouts.celery : Ensure that run directories are exists] ******************
ok: [vagrant] => (item=celery_run)

TASK [Stouts.celery : Configure celery] ****************************************
failed: [vagrant] (item=celery_run) => {"ansible_loop_var": "item", "changed": false, "item": "celery_run", "msg": "AnsibleUndefinedVariable: 'ansible.utils.unsafe_proxy.AnsibleUnsafeText object' has no attribute 'action'"}

PLAY RECAP *********************************************************************
vagrant                    : ok=113  changed=1    unreachable=0    failed=1    skipped=128  rescued=0    ignored=0

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

Здесь есть файлы Ansible и Vagrant и информация о настройке: https://github.com/Karan02/petalandstemTemp. Посмотрите на папки ansible и vagrant по этой ссылке.

Я думаю, что ошибка в выполнении ANSIBLE PlayBook Задача "[Stouts.celery: Configure celery]", я не знаю почему.

Одна ошибка произошла, когда я установил зависимости с помощью команды ansible-galaxy.

sudo ansible-galaxy install -r ./ansible/requirements.yml --force -p ./ansible/galaxy_roles

Мой файл needs.yml:

---
- src: Stouts.deploy
  version: 1.2.0

- src: kamaln7.swapfile

- src: Stouts.apt
  version: 1.4.0

- src: ANXS.hostname
  version: v1.1.0

- src: ANXS.ntp
  version: v1.1.0

- src: ANXS.git
  version: v1.0.1

- src: Stouts.python
  version: 2.2.0

- src: ANXS.apt
  version: v1.3.0

- src: ANXS.build-essential
  version: v1.0.2

- src: git+https://github.com/erik-moroz/postgresql.git
  version: ff850b8571798b2338275d5674f1b890fe1408d4
  name: ANXS.postgresql

- src: jdauphant.nginx
  version: v2.20.0

- src: geerlingguy.nodejs
  version: 4.1.1

- src: ocha.yarn
  version: v1.2.0

- src: erik-moroz.Supervisor
  version: v1.0.0

- src: git+https://github.com/m-kalyna/Stouts.celery.git
  version: c50857937042b729d8ac86f8ae210ef2e0081225
  name: Stouts.celery

- src: DavidWittman.redis
  version: 1.2.4

Ошибка:

[WARNING]: - Stouts.celery was NOT installed successfully: - command /usr/bin/git clone https://github.com/m-kalyna/Stouts.celery.git Stouts.celery failed in directory
/Users/my/.ansible/tmp/ansible-local-125522NZXaD/tmpq8B4GU (rc=128)
...