Greetings all. I'd like to tap your knowledge to see if there is a way to 
tweak a playbook to 'speed things up'. I have a list of apps that always 
get installed to a new server. If I do them manually, as either a single 
command:
apt install sendemail libio-socket-ssl-perl libnet-ssleay-perl perl openssl 
libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions dos2unix 
samba ntfs-3g gcc make git-core neofetch net-tools curl chrony 
linux-headers-$(uname -r) conky python3-pip -y
or individually
apt install app1
apt install app2
...
or as a bash script
it takes 5-7 minutes.
But if I run the install as a vars list using:
===== 
---
- name: test update playbook
  hosts: all
  gather_facts: no
  become: yes
  vars:
    applications:
    - sendemail
    - libio-socket-ssl-perl
    - libnet-ssleay-perl
    - perl
    - openssl
    - libauthen-pam-perl
    - libpam-runtime
    - libio-pty-perl
    - apt-show-versions
    - dos2unix
    - samba
    - ntfs-3g
    - gcc
    - make
    - git-core
    - neofetch
    - net-tools
    - curl
    - chrony
    - conky
    - python3-pip
    ansible_become_password: "SecReT_P@$$w0rD"
  tasks:
    - name: perform upgrade
      ansible.builtin.apt:
        upgrade: yes
        update_cache: yes
    - name: Remove stuff
      ansible.builtin.apt:
        autoremove: yes
    - name: install standard stuff
      apt:
        name: "{{ applications }}"
=====
it takes upwards of 30 minutes in the section:
TASK [ install standard stuff ]
the rest of the playbook runs in comparable time as doing it manually, just 
the install software takes a LOT longer than as a bash script or manually.
Thoughts on what I can do differently?

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/853e4cd0-3fbe-4691-87ee-b2b8ba0a6fdbn%40googlegroups.com.

Reply via email to