I am trying to install docker on one of my VMs on esxi, but i get this error
my playbook is below the error

PLAY [installing docker on ubuntu] 
*********************************************

TASK [vmware_guest] 
************************************************************
ok: [localhost] => (item=my_vm_01)

TASK [adding docker gpg key] 
***************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to 
download key at https://download.docker.com/linux/ubuntu/gpg: An unknown 
error occurred: ~/.netrc access too permissive: access permissions must 
restrict access to only the owner (/root/.netrc, line 3)"}

PLAY RECAP 
*********************************************************************
localhost                  : ok=1    changed=0    unreachable=0    
failed=1    skipped=0    rescued=0    ignored=0

---
- name: installing docker on ubuntu
  hosts: localhost
  remote_user: "{{ remote_user_name }}"
  gather_facts: no
  become: yes
  vars_files:
     - var_docker.yml
  vars:
   remote_user_name: cyber01
   apt_repo_data: "deb [arch=amd64]
   https://download.docker.com/linux/ubuntu xenial stable"
   apt_gpg_key: https://download.docker.com/linux/ubuntu/gpg
  tasks:
    - vmware_guest:
        hostname: "{{ VMWARE_HOST }}"
        username: "{{ VMWARE_USER }}"
        password: "{{ VMWARE_PASSWORD }}"
        validate_certs: no
        folder: /ha-datacenter/vm/
        name: "{{ item }}"
      with_items:
         - my_vm_01
    - name: adding docker gpg key
      apt_key:
        url: "{{ apt_gpg_key }}"
        state: present
    - name: add docker repository
      apt_repository:
   repo: "{{ apt_repo_data }}"
        state: present
    - name: installing docker-ce
      apt:
        name: docker-ce
        state: present
        update_cache: yes
    - name: install python-pip
      apt:
        name: python-pip
        state: present
    - name: install docker-py
      pip:
        name: "{{ item }}"
        state: present
      with_items:
        - docker-py


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8db02ce2-d54d-466f-a5e0-b32359ea30c8n%40googlegroups.com.

Reply via email to