Update ansible code
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
e33e55cd8c
commit
d8e47cba66
8 changed files with 39 additions and 39 deletions
|
|
@ -1 +1 @@
|
|||
ansible_uninstall: false
|
||||
ansible_uninstall: false
|
||||
|
|
|
|||
|
|
@ -6,11 +6,13 @@ galaxy_info:
|
|||
galaxy_tags: []
|
||||
license: GPL2
|
||||
platforms:
|
||||
- name: CentOS
|
||||
version:
|
||||
- 7
|
||||
- 8
|
||||
- name: RedHat
|
||||
version:
|
||||
- 7
|
||||
- 8
|
||||
- name: CentOS
|
||||
version:
|
||||
- 7
|
||||
- 8
|
||||
- 9
|
||||
- name: RedHat
|
||||
version:
|
||||
- 7
|
||||
- 8
|
||||
- 9
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
- name: Registering Ubuntu Ansible repository
|
||||
apt_repository:
|
||||
ansible.builtin.apt_repository:
|
||||
repo: ppa:ansible/ansible
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
|
@ -8,22 +8,21 @@
|
|||
- ansible_distribution == "Ubuntu"
|
||||
|
||||
- name: Registering Debian Ansible repository
|
||||
apt_repository:
|
||||
ansible.builtin.apt_repository:
|
||||
repo: deb http://ppa.launchpad.net/ansible/ansible/ubuntu {{ ansible_distribution_name }} main
|
||||
filename: ansible.list
|
||||
state: present
|
||||
update_cache: yes
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
# owner: root
|
||||
# group: root
|
||||
# ansible.builtin.group: root
|
||||
when:
|
||||
- ansible_distribution == "Debian"
|
||||
|
||||
- name: Install public repository Ansible GPG keys
|
||||
apt_key:
|
||||
ansible.builtin.apt_key:
|
||||
keyserver: keyserver.ubuntu.com
|
||||
id: 93C4A3FD7BB9C367
|
||||
state: present
|
||||
when:
|
||||
- ansible_distribution == "Debian"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
---
|
||||
#- name: Registering Ansible repository
|
||||
# get_url:
|
||||
# url: https://releases.ansible.com/ansible/rpm/ansible.repo
|
||||
# dest: /etc/yum.repos.d/ansible.repo
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: 0644
|
||||
# - name: Registering Ansible repository
|
||||
# ansible.builtin.get_url:
|
||||
# url: https://releases.ansible.com/ansible/rpm/ansible.repo
|
||||
# dest: /etc/yum.repos.d/ansible.repo
|
||||
# owner: root
|
||||
# ansible.builtin.group: root
|
||||
# mode: 0644
|
||||
|
||||
- name: Registering Ansible repository
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: yum-ansible.repo
|
||||
dest: /etc/yum.repos.d/ansible.repo
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
ansible.builtin.group: root
|
||||
mode: "0644"
|
||||
when:
|
||||
- "ansible_distribution == 'CentOS' or ansible_distribution == 'RedHat'"
|
||||
- "ansible_distribution_major_version < '8'"
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
- name: Define repo for {{ ansible_os_family }}
|
||||
include_tasks: add_repo_{{ ansible_os_family }}.yml
|
||||
ansible.builtin.include_tasks: add_repo_{{ ansible_os_family }}.yml
|
||||
tags:
|
||||
- config
|
||||
|
||||
- name: Install packages
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: '{{ ansible_packages }}'
|
||||
state: present
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
tags:
|
||||
- installation
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
---
|
||||
- block:
|
||||
- name: Include vars for {{ ansible_os_family }}
|
||||
include_vars: "{{ ansible_os_family }}.yml"
|
||||
ansible.builtin.include_vars: "{{ ansible_os_family }}.yml"
|
||||
|
||||
- name: Install Ansible
|
||||
include_tasks: "install.yml"
|
||||
ansible.builtin.include_tasks: "install.yml"
|
||||
when:
|
||||
- not ansible_uninstall|bool
|
||||
|
||||
- name: UnInstall Ansible
|
||||
include_tasks: "uninstall.yml"
|
||||
ansible.builtin.include_tasks: "uninstall.yml"
|
||||
when:
|
||||
- ansible_uninstall|bool
|
||||
|
||||
|
|
|
|||
|
|
@ -1,30 +1,30 @@
|
|||
---
|
||||
- name: Remove Ansible's files
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "/etc/yum.repos.d/ansible.repo"
|
||||
state: absent
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
|
||||
- name: Registering Ubuntu Ansible repository
|
||||
apt_repository:
|
||||
ansible.builtin.apt_repository:
|
||||
repo: ppa:ansible/ansible
|
||||
state: absent
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
when:
|
||||
- ansible_distribution == "Ubuntu"
|
||||
|
||||
- name: Registering Debian Ansible repository
|
||||
apt_repository:
|
||||
ansible.builtin.apt_repository:
|
||||
repo: deb http://ppa.launchpad.net/ansible/ansible/ubuntu {{ ansible_distribution_name }} main
|
||||
filename: ansible.list
|
||||
state: absent
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
when:
|
||||
- ansible_distribution == "Debian"
|
||||
|
||||
- name: Remove Ansible's packages
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: '{{ ansible_packages }}'
|
||||
state: absent
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
---
|
||||
ansible_packages:
|
||||
- ansible
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue