Merge pull request #188 from teutostack/warnings-removal
Fixing deprecation warnings regarding bare variables and aptpull/190/head
commit
a14dfe74e1
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
- name: User | Create User Group
|
- name: User | Create User Group
|
||||||
group: name={{item.group|default(item.name)}} system={{item.system|default(omit)}}
|
group: name={{item.group|default(item.name)}} system={{item.system|default(omit)}}
|
||||||
with_items: addusers
|
with_items: "{{ addusers }}"
|
||||||
|
|
||||||
- name: User | Create User
|
- name: User | Create User
|
||||||
user:
|
user:
|
||||||
|
@ -25,4 +25,4 @@
|
||||||
home: "{{item.home|default(omit)}}"
|
home: "{{item.home|default(omit)}}"
|
||||||
name: "{{item.name}}"
|
name: "{{item.name}}"
|
||||||
system: "{{item.system|default(omit)}}"
|
system: "{{item.system|default(omit)}}"
|
||||||
with_items: addusers
|
with_items: "{{ addusers }}"
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
resource: "{{item.item.type}}"
|
resource: "{{item.item.type}}"
|
||||||
filename: /etc/kubernetes/{{item.item.file}}
|
filename: /etc/kubernetes/{{item.item.file}}
|
||||||
state: "{{item.changed | ternary('latest','present') }}"
|
state: "{{item.changed | ternary('latest','present') }}"
|
||||||
with_items: manifests.results
|
with_items: "{{ manifests.results }}"
|
||||||
when: inventory_hostname == groups['kube-master'][0]
|
when: inventory_hostname == groups['kube-master'][0]
|
||||||
|
|
||||||
- name: Check for dnsmasq port (pulling image and running container)
|
- name: Check for dnsmasq port (pulling image and running container)
|
||||||
|
|
|
@ -28,14 +28,14 @@
|
||||||
id: "{{item}}"
|
id: "{{item}}"
|
||||||
keyserver: "{{docker_repo_key_info.keyserver}}"
|
keyserver: "{{docker_repo_key_info.keyserver}}"
|
||||||
state: present
|
state: present
|
||||||
with_items: docker_repo_key_info.repo_keys
|
with_items: "{{ docker_repo_key_info.repo_keys }}"
|
||||||
|
|
||||||
- name: ensure docker repository is enabled
|
- name: ensure docker repository is enabled
|
||||||
action: "{{ docker_repo_info.pkg_repo }}"
|
action: "{{ docker_repo_info.pkg_repo }}"
|
||||||
args:
|
args:
|
||||||
repo: "{{item}}"
|
repo: "{{item}}"
|
||||||
state: present
|
state: present
|
||||||
with_items: docker_repo_info.repos
|
with_items: "{{ docker_repo_info.repos }}"
|
||||||
when: docker_repo_info.repos|length > 0
|
when: docker_repo_info.repos|length > 0
|
||||||
|
|
||||||
- name: ensure docker packages are installed
|
- name: ensure docker packages are installed
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
args:
|
args:
|
||||||
pkg: "{{item}}"
|
pkg: "{{item}}"
|
||||||
state: present
|
state: present
|
||||||
with_items: docker_package_info.pkgs
|
with_items: "{{ docker_package_info.pkgs }}"
|
||||||
when: docker_package_info.pkgs|length > 0
|
when: docker_package_info.pkgs|length > 0
|
||||||
|
|
||||||
- name: Centos needs xfs storage type for devicemapper if used
|
- name: Centos needs xfs storage type for devicemapper if used
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
- name: Create dest directories
|
- name: Create dest directories
|
||||||
file: path={{local_release_dir}}/{{item.dest|dirname}} state=directory recurse=yes
|
file: path={{local_release_dir}}/{{item.dest|dirname}} state=directory recurse=yes
|
||||||
with_items: downloads
|
with_items: "{{ downloads }}"
|
||||||
|
|
||||||
- name: Download items
|
- name: Download items
|
||||||
get_url:
|
get_url:
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
sha256sum: "{{item.sha256 | default(omit)}}"
|
sha256sum: "{{item.sha256 | default(omit)}}"
|
||||||
owner: "{{ item.owner|default(omit) }}"
|
owner: "{{ item.owner|default(omit) }}"
|
||||||
mode: "{{ item.mode|default(omit) }}"
|
mode: "{{ item.mode|default(omit) }}"
|
||||||
with_items: downloads
|
with_items: "{{ downloads }}"
|
||||||
|
|
||||||
- name: Extract archives
|
- name: Extract archives
|
||||||
unarchive:
|
unarchive:
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
mode: "{{ item.mode|default(omit) }}"
|
mode: "{{ item.mode|default(omit) }}"
|
||||||
copy: no
|
copy: no
|
||||||
when: "{{item.unarchive is defined and item.unarchive == True}}"
|
when: "{{item.unarchive is defined and item.unarchive == True}}"
|
||||||
with_items: downloads
|
with_items: "{{ downloads }}"
|
||||||
|
|
||||||
- name: Fix permissions
|
- name: Fix permissions
|
||||||
file:
|
file:
|
||||||
|
@ -29,4 +29,4 @@
|
||||||
owner: "{{ item.owner|default(omit) }}"
|
owner: "{{ item.owner|default(omit) }}"
|
||||||
mode: "{{ item.mode|default(omit) }}"
|
mode: "{{ item.mode|default(omit) }}"
|
||||||
when: "{{item.unarchive is not defined or item.unarchive == False}}"
|
when: "{{item.unarchive is not defined or item.unarchive == False}}"
|
||||||
with_items: downloads
|
with_items: "{{ downloads }}"
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
- meta: flush_handlers
|
- meta: flush_handlers
|
||||||
|
|
||||||
- include: start.yml
|
- include: start.yml
|
||||||
with_items: groups['kube-master']
|
with_items: "{{ groups['kube-master'] }}"
|
||||||
when: "{{ hostvars[item].inventory_hostname == inventory_hostname }}"
|
when: "{{ hostvars[item].inventory_hostname == inventory_hostname }}"
|
||||||
|
|
||||||
# Create kube-system namespace
|
# Create kube-system namespace
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
create: yes
|
create: yes
|
||||||
backup: yes
|
backup: yes
|
||||||
when: hostvars[item].ansible_default_ipv4.address is defined
|
when: hostvars[item].ansible_default_ipv4.address is defined
|
||||||
with_items: groups['all']
|
with_items: "{{ groups['all'] }}"
|
||||||
|
|
||||||
- name: Hosts | populate kubernetes loadbalancer address into hosts file
|
- name: Hosts | populate kubernetes loadbalancer address into hosts file
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
|
|
@ -64,18 +64,13 @@
|
||||||
- "/opt/cni/bin"
|
- "/opt/cni/bin"
|
||||||
when: kube_network_plugin == "calico"
|
when: kube_network_plugin == "calico"
|
||||||
|
|
||||||
- name: Update package management cache (APT)
|
|
||||||
apt: update_cache=yes
|
|
||||||
when: ansible_pkg_mgr == 'apt'
|
|
||||||
|
|
||||||
- name: Update package management cache (YUM)
|
- name: Update package management cache (YUM)
|
||||||
yum: update_cache=yes name='*'
|
yum: update_cache=yes name='*'
|
||||||
when: ansible_pkg_mgr == 'yum'
|
when: ansible_pkg_mgr == 'yum'
|
||||||
|
|
||||||
- name: Install python-apt for Debian distribs
|
- name: Install latest version of python-apt for Debian distribs
|
||||||
command: apt-get install -y python-apt
|
apt: name=python-apt state=latest update_cache=yes cache_valid_time=3600
|
||||||
when: ansible_os_family == "Debian"
|
when: ansible_os_family == "Debian"
|
||||||
changed_when: False
|
|
||||||
|
|
||||||
- name: Install python-dnf for latest RedHat versions
|
- name: Install python-dnf for latest RedHat versions
|
||||||
command: dnf install -y python-dnf yum
|
command: dnf install -y python-dnf yum
|
||||||
|
|
|
@ -48,4 +48,4 @@
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
mode: 0600
|
mode: 0600
|
||||||
with_items: keyfiles.stdout_lines
|
with_items: "{{ keyfiles.stdout_lines }}"
|
||||||
|
|
Loading…
Reference in New Issue