ansible/roles/common/tasks/main.yml in subspace-2.5.5 vs ansible/roles/common/tasks/main.yml in subspace-2.5.6

- old
+ new

@@ -123,10 +123,16 @@ become: true tags: - maintenance - upgrade + - name: Install acl so ansible can become a non-privileged user + apt: + pkg: acl + state: present + become: true + - name: Get os_upgrades stats shell: cmd: | sed -n "/$(date '+%Y-%m')/,+2p" updates.log | # Groups of lines from the current month grep 'packages\|immediately' | # Only lines matching 'packages' or 'immediately' @@ -195,12 +201,11 @@ - stats - name: Get os_security_upgrades stats shell: cmd: | - sed -n "/$(date '+%Y-%m')/,+2p" updates.log | # Groups of lines from the current month + grep -A 1 $(date +%Y-%m) updates.log | # Groups of lines from the current month grep 'security' | # Only lines matching 'security' - grep -P -o '(^\d+)' | #Extract the numbers at the beginning of the lines awk '{s+=$1} END {print s}' # Sum all the lines args: chdir: /opt/subspace register: stats_os_security_upgrades when: send_stats == true and stats_url is defined and stats_api_key is defined