aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2022-06-22 20:57:51 -0700
committerBryan Newbold <bnewbold@archive.org>2022-06-22 21:00:08 -0700
commit5d201f7d9b55ff50753da2456634a3e51462ba1f (patch)
tree073a983bb2162b71af6270bb9d454d0341bf7272 /roles
parentb64c159c3df815c361a19884d63ceba59b709990 (diff)
downloadinfra-5d201f7d9b55ff50753da2456634a3e51462ba1f.tar.gz
infra-5d201f7d9b55ff50753da2456634a3e51462ba1f.zip
refactor 'apt' tasks to newer syntax (not 'with_items')
Diffstat (limited to 'roles')
-rw-r--r--roles/common/tasks/extrapkg.yml24
-rw-r--r--roles/common/tasks/main.yml129
-rw-r--r--roles/common/tasks/ntp.yml2
-rw-r--r--roles/common/tasks/security.yml15
-rw-r--r--roles/git/tasks/cgit.yml11
-rw-r--r--roles/git/tasks/git-daemon.yml4
-rw-r--r--roles/git/tasks/gitolite.yml2
-rw-r--r--roles/mailserver/tasks/dovecot.yml14
-rw-r--r--roles/mailserver/tasks/postfix.yml13
-rw-r--r--roles/mailserver/tasks/rspamd.yml4
-rw-r--r--roles/mediagoblin/tasks/mediagoblin.yml25
-rw-r--r--roles/nullmailer/tasks/main.yml9
-rw-r--r--roles/znc/tasks/znc.yml8
13 files changed, 130 insertions, 130 deletions
diff --git a/roles/common/tasks/extrapkg.yml b/roles/common/tasks/extrapkg.yml
index 0836912..79e08cb 100644
--- a/roles/common/tasks/extrapkg.yml
+++ b/roles/common/tasks/extrapkg.yml
@@ -1,17 +1,17 @@
---
- name: Install extras that Everybody wants
- apt: pkg={{ item }} state=installed
- with_items:
- - ack-grep
- - alpine
- - build-essential
- - cowsay
- - ctorrent
- - figlet
- - ipython
- - ipython3
- - lynx
- - manpages-dev
+ apt:
+ state: present
+ name:
+ - ack-grep
+ - alpine
+ - build-essential
+ - cowsay
+ - ctorrent
+ - figlet
+ - ipython3
+ - lynx
+ - manpages-dev
tags:
- dependencies
diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml
index a1f4500..ec5ad7b 100644
--- a/roles/common/tasks/main.yml
+++ b/roles/common/tasks/main.yml
@@ -11,70 +11,71 @@
- dependencies
- name: Install necessities and nice-to-haves
- apt: pkg={{ item }} state=installed
- with_items:
- # fail2ban in security
- # rkhunter in security
- - apt-transport-https
- - apticron
- - aptitude
- - bash-completion
- - bzip2
- - ca-certificates
- - curl
- - debian-goodies
- - dialog
- - dnsutils
- - dstat
- - etckeeper
- - fd-find
- - file
- - git
- - htop
- - httpie
- - iftop
- - ifupdown
- - iotop
- - iproute
- - iputils-ping
- - isc-dhcp-client
- - jq
- - less
- - libui-dialog-perl
- - lnav
- - locales
- - locales-all
- - lsof
- - lvm2
- - man-db
- - manpages-dev
- - molly-guard
- - moreutils
- - mosh
- - mtr-tiny
- - net-tools
- - netbase
- - netcat
- - ngrep
- - openssh-server
- - openssl
- - parallel
- - pigz
- - pv
- - python
- - python-software-properties
- - ripgrep
- - screen
- - sqlite3
- - sudo
- - tcpdump
- - tree
- - unattended-upgrades
- - unzip
- - util-linux
- - vim-nox
- - wget
- - zip
+ apt:
+ state: present
+ name:
+ # fail2ban in security
+ # rkhunter in security
+ - apt-transport-https
+ - apticron
+ - aptitude
+ - bash-completion
+ - bzip2
+ - ca-certificates
+ - curl
+ - debian-goodies
+ - dialog
+ - dnsutils
+ - dstat
+ - etckeeper
+ - fd-find
+ - file
+ - git
+ - htop
+ - httpie
+ - iftop
+ - ifupdown
+ - iotop
+ - iproute
+ - iputils-ping
+ - isc-dhcp-client
+ - jq
+ - less
+ - libui-dialog-perl
+ - lnav
+ - locales
+ - locales-all
+ - lsof
+ - lvm2
+ - man-db
+ - manpages-dev
+ - molly-guard
+ - moreutils
+ - mosh
+ - mtr-tiny
+ - net-tools
+ - netbase
+ - netcat
+ - ngrep
+ - openssh-server
+ - openssl
+ - parallel
+ - pigz
+ - pv
+ - python3
+ - python3-software-properties
+ - ripgrep
+ - screen
+ - sqlite3
+ - sudo
+ - tcpdump
+ - tree
+ - unattended-upgrades
+ - unzip
+ - util-linux
+ - vim-nox
+ - wget
+ - zip
tags:
- dependencies
diff --git a/roles/common/tasks/ntp.yml b/roles/common/tasks/ntp.yml
index c1489fd..219cdb5 100644
--- a/roles/common/tasks/ntp.yml
+++ b/roles/common/tasks/ntp.yml
@@ -2,7 +2,7 @@
# Defines tasks applicable for NTP (Network Time Protocol)
- name: Install ntp
- apt: pkg=ntp state=installed
+ apt: name=ntp state=present
tags:
- dependencies
diff --git a/roles/common/tasks/security.yml b/roles/common/tasks/security.yml
index c00b941..df2f065 100644
--- a/roles/common/tasks/security.yml
+++ b/roles/common/tasks/security.yml
@@ -1,12 +1,13 @@
---
- name: Install security-related packages
- apt: pkg={{ item }} state=installed
- with_items:
- - fail2ban
- - whois
- - lynis
- - rkhunter
- - debsums
+ apt:
+ state: present
+ name:
+ - fail2ban
+ - whois
+ - lynis
+ - rkhunter
+ - debsums
tags:
- dependencies
diff --git a/roles/git/tasks/cgit.yml b/roles/git/tasks/cgit.yml
index 9d3f2db..40c5af7 100644
--- a/roles/git/tasks/cgit.yml
+++ b/roles/git/tasks/cgit.yml
@@ -1,10 +1,11 @@
- name: Install cgit package and deps (fcgi stuff)
- apt: pkg={{ item }} state=installed
- with_items:
- - cgit
- - fcgiwrap
- - spawn-fcgi
+ apt:
+ state: present
+ name:
+ - cgit
+ - fcgiwrap
+ - spawn-fcgi
tags:
- dependencies
diff --git a/roles/git/tasks/git-daemon.yml b/roles/git/tasks/git-daemon.yml
index 793275c..b604401 100644
--- a/roles/git/tasks/git-daemon.yml
+++ b/roles/git/tasks/git-daemon.yml
@@ -1,8 +1,6 @@
- name: Install git-daemon-sysvinit package
- apt: pkg={{ item }} state=installed
- with_items:
- - git-daemon-sysvinit
+ apt: name=git-daemon-sysvinit state=present
tags:
- dependencies
diff --git a/roles/git/tasks/gitolite.yml b/roles/git/tasks/gitolite.yml
index 09a6ac8..f926560 100644
--- a/roles/git/tasks/gitolite.yml
+++ b/roles/git/tasks/gitolite.yml
@@ -8,7 +8,7 @@
user: name=www-data groups=git append=yes
- name: Install gitolite3 package
- apt: pkg=gitolite3 state=installed
+ apt: name=gitolite3 state=present
tags:
- dependencies
diff --git a/roles/mailserver/tasks/dovecot.yml b/roles/mailserver/tasks/dovecot.yml
index 9d2c20e..ca62b96 100644
--- a/roles/mailserver/tasks/dovecot.yml
+++ b/roles/mailserver/tasks/dovecot.yml
@@ -1,10 +1,12 @@
- name: Install Dovecot and related packages
- apt: pkg={{ item }} update_cache=yes state=installed
- with_items:
- - dovecot-core
- - dovecot-imapd
- - dovecot-lmtpd
- - dovecot-antispam
+ apt:
+ update_cache: yes
+ state: present
+ name:
+ - dovecot-core
+ - dovecot-imapd
+ - dovecot-lmtpd
+ - dovecot-antispam
tags:
- dependencies
diff --git a/roles/mailserver/tasks/postfix.yml b/roles/mailserver/tasks/postfix.yml
index a36acd6..7b02cf4 100644
--- a/roles/mailserver/tasks/postfix.yml
+++ b/roles/mailserver/tasks/postfix.yml
@@ -1,10 +1,11 @@
- name: Install Postfix and related packages
- apt: pkg={{ item }} state=installed
- with_items:
- - libsasl2-modules
- - postfix
- - postfix-pcre
- - sasl2-bin
+ apt:
+ state: present
+ name:
+ - libsasl2-modules
+ - postfix
+ - postfix-pcre
+ - sasl2-bin
tags:
- dependencies
diff --git a/roles/mailserver/tasks/rspamd.yml b/roles/mailserver/tasks/rspamd.yml
index 4d870a8..c00bf72 100644
--- a/roles/mailserver/tasks/rspamd.yml
+++ b/roles/mailserver/tasks/rspamd.yml
@@ -26,9 +26,7 @@
- dependencies
- name: Install Rspamd and Redis
- apt: pkg={{ item }} state=installed update_cache=yes
- with_items:
- - rspamd
+ apt: pkg=rspamd state=installed update_cache=yes
tags:
- dependencies
diff --git a/roles/mediagoblin/tasks/mediagoblin.yml b/roles/mediagoblin/tasks/mediagoblin.yml
index ff092e6..12252e1 100644
--- a/roles/mediagoblin/tasks/mediagoblin.yml
+++ b/roles/mediagoblin/tasks/mediagoblin.yml
@@ -1,16 +1,17 @@
- name: Install mediagoblin dependencies
- apt: name={{item}} state=installed
- with_items:
- - python3-dev
- - python3-lxml
- - python3-pil
- - python3-virtualenv
- - python3-babel
- - python3-pip
- - virtualenv
- - automake
- - npm # XXX: really? UGH
- - nodejs-legacy
+ apt:
+ state: present
+ name:
+ - python3-dev
+ - python3-lxml
+ - python3-pil
+ - python3-virtualenv
+ - python3-babel
+ - python3-pip
+ - virtualenv
+ - automake
+ - npm # XXX: really? UGH
+ - nodejs-legacy
tags:
- dependencies
diff --git a/roles/nullmailer/tasks/main.yml b/roles/nullmailer/tasks/main.yml
index d694173..b22cda3 100644
--- a/roles/nullmailer/tasks/main.yml
+++ b/roles/nullmailer/tasks/main.yml
@@ -1,9 +1,10 @@
---
- name: Install nullmailer and mailx
- apt: name={{ item }} state=installed
- with_items:
- - nullmailer
- - heirloom-mailx
+ apt:
+ state: present
+ name:
+ - nullmailer
+ - heirloom-mailx
tags:
- dependencies
diff --git a/roles/znc/tasks/znc.yml b/roles/znc/tasks/znc.yml
index ecb6103..a320041 100644
--- a/roles/znc/tasks/znc.yml
+++ b/roles/znc/tasks/znc.yml
@@ -2,15 +2,11 @@
- name: Install znc (jessie-backports)
when: (ansible_distribution == "Debian" and ansible_distribution_major_version == "8")
- apt: pkg={{ item }} state=installed repo=jessie-backports
- with_items:
- - znc
+ apt: name=znc state=present repo=jessie-backports
- name: Install znc (non-jessie)
when: not (ansible_distribution == "Debian" and ansible_distribution_major_version == "8")
- apt: pkg={{ item }} state=installed
- with_items:
- - znc
+ apt: name=znc state=present
- name: Create znc group
group: name=znc state=present