Add 'packages' tag to any task doing package stuff
For idempotence we need to run all apt-related tasks, like editing source files, adding keys, installing packages, etc, when running the 'packages' tag.
This commit is contained in:
parent
7589136453
commit
e343ddc9a6
@ -5,6 +5,7 @@
|
||||
with_items:
|
||||
- firewalld
|
||||
- tidy
|
||||
tags: packages
|
||||
|
||||
- name: Copy firewalld public zone file
|
||||
when: ansible_distribution_major_version == '8'
|
||||
|
@ -2,6 +2,7 @@
|
||||
- name: Install iptables-persistent
|
||||
when: ansible_distribution_version == '14.04'
|
||||
apt: pkg=iptables-persistent update_cache=yes
|
||||
tags: packages
|
||||
|
||||
- name: Copy /etc/iptables/rules.v4
|
||||
when: ansible_distribution_version == '14.04'
|
||||
@ -21,6 +22,7 @@
|
||||
with_items:
|
||||
- firewalld
|
||||
- tidy
|
||||
tags: packages
|
||||
|
||||
- name: Copy firewalld public zone file
|
||||
when: ansible_distribution_version >= '15.04'
|
||||
|
@ -1,25 +1,25 @@
|
||||
---
|
||||
- name: Add GPG key for MariaDB repo
|
||||
apt_key: id=0xcbcb082a1bb943db url=http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xcbcb082a1bb943db
|
||||
tags: mariadb
|
||||
tags: mariadb, packages
|
||||
|
||||
- name: Remove old repo file
|
||||
file: path={{ item }} state=absent
|
||||
with_items:
|
||||
- /etc/apt/sources.list.d/sgp1_mirrors_digitalocean_com_mariadb_repo_10_1_debian.list
|
||||
- /etc/apt/sources.list.d/sgp1_mirrors_digitalocean_com_mariadb_repo_10_1_ubuntu.list
|
||||
tags: mariadb
|
||||
tags: mariadb, packages
|
||||
|
||||
- name: Add MariaDB 10.1 repo
|
||||
template: src=mariadb.list.j2 dest=/etc/apt/sources.list.d/mariadb.list owner=root group=root mode=0644
|
||||
tags: mariadb
|
||||
tags: mariadb, packages
|
||||
|
||||
- name: Install mariadb-server
|
||||
apt: name={{ item }} state=present update_cache=yes
|
||||
with_items:
|
||||
- mariadb-server
|
||||
- python-mysqldb # for ansible
|
||||
tags: mariadb
|
||||
tags: mariadb, packages
|
||||
|
||||
- name: Create system my.cnf
|
||||
template: src=my.cnf.j2 dest=/etc/mysql/my.cnf owner=root group=root mode=0644
|
||||
|
@ -4,6 +4,7 @@
|
||||
when: ansible_os_family == "Ubuntu"
|
||||
with_items:
|
||||
- munin-node
|
||||
tags: packages
|
||||
|
||||
# some nice things to have for munin-node on Ubuntu
|
||||
- name: Install munin-node deps
|
||||
@ -11,6 +12,7 @@
|
||||
apt: name={{ item }} state=present
|
||||
with_items:
|
||||
- libwww-perl #for munin's nginx_status check
|
||||
tags: packages
|
||||
|
||||
- name: Create munin-node.conf
|
||||
template: src=munin-node.conf.j2 dest=/etc/munin/munin-node.conf
|
||||
|
@ -4,6 +4,7 @@
|
||||
when: ansible_os_family == "Debian"
|
||||
with_items:
|
||||
- munin
|
||||
tags: packages
|
||||
|
||||
- name: Create munin configuration file
|
||||
template: src=munin.conf.j2 dest=/etc/munin/munin.conf owner=root group=root mode=0644
|
||||
|
@ -1,15 +1,15 @@
|
||||
---
|
||||
- name: Add nginx.org apt signing key
|
||||
apt_key: url=http://nginx.org/keys/nginx_signing.key state=present
|
||||
tags: nginx
|
||||
tags: nginx, packages
|
||||
|
||||
- name: Add nginx.org repo
|
||||
template: src=nginx_org_sources.list.j2 dest=/etc/apt/sources.list.d/nginx_org_sources.list owner=root group=root mode=0644
|
||||
tags: nginx
|
||||
tags: nginx, packages
|
||||
|
||||
- name: Install nginx
|
||||
apt: pkg=nginx update_cache=yes state=latest
|
||||
tags: nginx
|
||||
tags: nginx, packages
|
||||
|
||||
- name: Copy nginx configs
|
||||
copy: src={{ item }} dest=/etc/nginx/{{ item }} mode=0644 owner=root group=root
|
||||
|
@ -7,7 +7,7 @@
|
||||
- php5-mysql
|
||||
- php5-gd
|
||||
- php5-curl
|
||||
tags: php-fpm
|
||||
tags: php-fpm, packages
|
||||
|
||||
- name: Copy php5-fpm pool config
|
||||
template: src=pool.conf.j2 dest=/etc/php5/fpm/pool.d/{{ item.domain_name }}.conf owner=root group=root mode=0644
|
||||
|
@ -10,7 +10,7 @@
|
||||
# for Piwik
|
||||
- php7.0-mbstring
|
||||
- php7.0-xml
|
||||
tags: php-fpm
|
||||
tags: php-fpm, packages
|
||||
|
||||
- name: Copy php-fpm pool config
|
||||
template: src=php7.0-pool.conf.j2 dest=/etc/php/7.0/fpm/pool.d/{{ item.domain_name }}.conf owner=root group=root mode=0644
|
||||
|
Loading…
Reference in New Issue
Block a user