forked from stove/risotto
enhancement(ansible/host.yml) remove packages
This commit is contained in:
parent
db86a3d02c
commit
96132ae60a
3 changed files with 9 additions and 2 deletions
|
@ -10,12 +10,18 @@
|
|||
ansible.builtin.hostname:
|
||||
name: "{{ inventory_hostname }}"
|
||||
|
||||
- name: "Packages installation"
|
||||
- name: "Install packages"
|
||||
apt:
|
||||
pkg: "{{ vars[inventory_hostname]['general']['host_packages'] }}"
|
||||
update_cache: yes
|
||||
state: latest
|
||||
|
||||
- name: "Remove packages"
|
||||
apt:
|
||||
pkg: "{{ vars[inventory_hostname]['general']['host_removed_packages'] }}"
|
||||
update_cache: yes
|
||||
state: absent
|
||||
|
||||
- name: "Add keyrings directory"
|
||||
file:
|
||||
path: /etc/apt/keyrings
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
|
||||
- name: "Start services"
|
||||
when: item.value['manage'] and item.value['activate'] and item.value['doc'].endswith('.service') and not item.value['doc'].endswith('@.service') and item.value['engine']
|
||||
ignore_errors: true
|
||||
ansible.builtin.service:
|
||||
name: "{{ item.value['doc'] }}"
|
||||
state: started
|
||||
|
|
|
@ -76,7 +76,7 @@ class RisottoInventory(object):
|
|||
'hosts': servers,
|
||||
'vars': {
|
||||
# FIXME
|
||||
'ansible_ssh_host': '192.168.0.29',
|
||||
# 'ansible_ssh_host': '192.168.0.28',
|
||||
'ansible_ssh_user': 'root',
|
||||
'ansible_python_interpreter': '/usr/bin/python3'
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue