Skip to content
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

No package matching 'python3-pip' is available #1

Closed
y-temp4 opened this issue Oct 11, 2018 · 4 comments · Fixed by #2
Closed

No package matching 'python3-pip' is available #1

y-temp4 opened this issue Oct 11, 2018 · 4 comments · Fixed by #2

Comments

@y-temp4
Copy link

y-temp4 commented Oct 11, 2018

Thank you for your great work! This role is very useful for me.

By the way, I got this error when I use ubuntu-xenial-16.04-amd64-server-20171121.1 (ami-bec974d8).

(item=python3-pip) => {"changed": false, "item": "python3-pip", "msg": "No package matching 'python3-pip' is available"}

But before this commit, I can use this role.

I want to use this pipenv role for above version of ubuntu.

@leesoh
Copy link
Owner

leesoh commented Oct 11, 2018

That's interesting since the package name has remained the same (https://packages.ubuntu.com/search?keywords=python3-pip&searchon=names&suite=all&section=all). Can you install the package manually?

@y-temp4
Copy link
Author

y-temp4 commented Oct 18, 2018

That's interesting since the package name has remained the same (https://packages.ubuntu.com/search?keywords=python3-pip&searchon=names&suite=all&section=all).

That is certainly true 😂

Can you install the package manually?

I didn't try that, but I cloud install the package using following task.

---
- name: Get validator address
  shell: "cat {{ parity_keys_path }}/PrivateChain/{{ inventory_hostname }} | jq '.address' | sed 's/\"//g'"
  register: validator_address

- name: Add validator to config.toml
  lineinfile: >-
    dest='{{ parity_base_path }}/config.toml'
    state=present
    backrefs=yes
    regexp='^{{ item.key }}.*'
    line='{{ item.key }} = {{ item.value }}'
  with_items:
    - { key: 'engine_signer', value: '"0x{{ validator_address.stdout }}"' }

- name: Reload supervisor to start parity
  service: name=supervisor state=reloaded

- pause:
    minutes: 1

- name: enode tasks
  shell: "ip addr show eth0 | grep 'inet ' | awk '{print $2}' | cut -f1 -d'/' | xargs echo"
  register: private_ips

- shell: "curl --data '{\"jsonrpc\":\"2.0\",\"method\":\"parity_enode\",\"params\":[],\"id\":0}' -H \"Content-Type: application/json\" -X POST {{ item }}:8545 | jq '.result'"
  register: enodes
  with_items: '{{ private_ips.stdout }}'

- file: path={{ parity_base_path }}/enode.sh state=touch owner=root group=root mode=0755

- lineinfile:
    dest: '{{ parity_base_path }}/enode.sh'
    line: "curl --data '{\"jsonrpc\":\"2.0\",\"method\":\"parity_addReservedPeer\",\"params\":[{{ item }}],\"id\":0}' -H \"Content-Type: application/json\" -X POST localhost:8545"
  with_items:
    - '{{ enodes.results[0].stdout }}'

- name: Install lsyncd
  apt:
    name: "{{ item }}"
    state: present
    update_cache: yes
  with_items:
    - lsyncd

- name: Change permissions for keys directory
  file: path="{{ parity_keys_path }}" state=directory mode=755 owner=ubuntu group=ubuntu recurse=yes

- name: Add directory for lsyncd config
  file: path=/etc/lsyncd state=directory owner=root group=root mode=0755

- name: Add lsyncd config
  template: src={{ item.src }} dest={{ item.dest }} backup=yes
  with_items:
    - { src: 'lsyncd.conf.lua.j2', dest: '/etc/lsyncd/lsyncd.conf.lua' }

- name: Add lsyncd config for supervisor
  template: src={{ item.src }} dest=/etc/supervisor/conf.d/{{ item.dest }} backup=yes
  with_items:
    - { src: 'lsync.conf.j2', dest: 'lsync.conf' }

- name: Change account refresh time to 5 sec
  lineinfile: >-
    dest='{{ parity_base_path }}/config.toml'
    state=present
    backrefs=yes
    regexp='^{{ item.key }}.*'
    line='{{ item.key }} = {{ item.value }}'
  with_items:
    - { key: 'refresh_time', value: '5' }

- name: Reload supervisor to start lsync
  service: name=supervisor state=reloaded

- pause:
    seconds: 10

- name: And restart lsync to fix startup problem.
  command: /etc/init.d/lsyncd restart

@leesoh
Copy link
Owner

leesoh commented Oct 18, 2018

I may need another coffee, but I'm not seeing how the code you shared is related to the python3-pip problem. What am I missing?

I'd suggest trying a manual install of python3-pip and see if that gets us anywhere.

sot528 referenced this issue in sot528/ansible-role-pipenv Jan 21, 2019
@sot528 sot528 mentioned this issue Jan 21, 2019
@sot528
Copy link
Contributor

sot528 commented Jan 21, 2019

@leesoh
I fixed this problem ;)
Please check it out: #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants