This commit is contained in:
parent
d8e47cba66
commit
6c8c828300
4 changed files with 42 additions and 41 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
ansible.builtin.apt_repository:
|
ansible.builtin.apt_repository:
|
||||||
repo: ppa:ansible/ansible
|
repo: ppa:ansible/ansible
|
||||||
state: present
|
state: present
|
||||||
update_cache: yes
|
update_cache: true
|
||||||
when:
|
when:
|
||||||
- ansible_distribution == "Ubuntu"
|
- ansible_distribution == "Ubuntu"
|
||||||
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
repo: deb http://ppa.launchpad.net/ansible/ansible/ubuntu {{ ansible_distribution_name }} main
|
repo: deb http://ppa.launchpad.net/ansible/ansible/ubuntu {{ ansible_distribution_name }} main
|
||||||
filename: ansible.list
|
filename: ansible.list
|
||||||
state: present
|
state: present
|
||||||
update_cache: yes
|
update_cache: true
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
# owner: root
|
# owner: root
|
||||||
# ansible.builtin.group: root
|
# ansible.builtin.group: root
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
---
|
---
|
||||||
- name: Define repo for {{ ansible_os_family }}
|
- name: Define repo for {{ ansible_os_family }}
|
||||||
ansible.builtin.include_tasks: add_repo_{{ ansible_os_family }}.yml
|
ansible.builtin.include_tasks: add_repo_{{ ansible_os_family }}.yml
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: '{{ ansible_packages }}'
|
name: '{{ ansible_packages }}'
|
||||||
state: present
|
state: present
|
||||||
update_cache: true
|
update_cache: true
|
||||||
tags:
|
tags:
|
||||||
- installation
|
- installation
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
- block:
|
- name: Ansible tasks
|
||||||
|
block:
|
||||||
- name: Include vars for {{ ansible_os_family }}
|
- name: Include vars for {{ ansible_os_family }}
|
||||||
ansible.builtin.include_vars: "{{ ansible_os_family }}.yml"
|
ansible.builtin.include_vars: "{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
|
|
@ -14,4 +15,4 @@
|
||||||
- ansible_uninstall|bool
|
- ansible_uninstall|bool
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
- ansible
|
- ansible
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,30 @@
|
||||||
---
|
---
|
||||||
- name: Remove Ansible's files
|
- name: Remove Ansible's files
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "/etc/yum.repos.d/ansible.repo"
|
path: "/etc/yum.repos.d/ansible.repo"
|
||||||
state: absent
|
state: absent
|
||||||
when:
|
when:
|
||||||
- ansible_os_family == 'RedHat'
|
- ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
- name: Registering Ubuntu Ansible repository
|
- name: Registering Ubuntu Ansible repository
|
||||||
ansible.builtin.apt_repository:
|
ansible.builtin.apt_repository:
|
||||||
repo: ppa:ansible/ansible
|
repo: ppa:ansible/ansible
|
||||||
state: absent
|
state: absent
|
||||||
update_cache: true
|
update_cache: true
|
||||||
when:
|
when:
|
||||||
- ansible_distribution == "Ubuntu"
|
- ansible_distribution == "Ubuntu"
|
||||||
|
|
||||||
- name: Registering Debian Ansible repository
|
- name: Registering Debian Ansible repository
|
||||||
ansible.builtin.apt_repository:
|
ansible.builtin.apt_repository:
|
||||||
repo: deb http://ppa.launchpad.net/ansible/ansible/ubuntu {{ ansible_distribution_name }} main
|
repo: deb http://ppa.launchpad.net/ansible/ansible/ubuntu {{ ansible_distribution_name }} main
|
||||||
filename: ansible.list
|
filename: ansible.list
|
||||||
state: absent
|
state: absent
|
||||||
update_cache: true
|
update_cache: true
|
||||||
when:
|
when:
|
||||||
- ansible_distribution == "Debian"
|
- ansible_distribution == "Debian"
|
||||||
|
|
||||||
- name: Remove Ansible's packages
|
- name: Remove Ansible's packages
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: '{{ ansible_packages }}'
|
name: '{{ ansible_packages }}'
|
||||||
state: absent
|
state: absent
|
||||||
update_cache: true
|
update_cache: true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue