Auto-fix usage of modules via FQCN
Since ansible-core 2.10 it is recommended to use modules via FQCN In order to align with recommendation, we perform migration by applying suggestions made by `ansible-lint --fix=fqcn` Change-Id: I1558d4bd0d6d45262338d0056dc063fdef156cbe
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
- name: Stop services
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: "{{ item.service_name }}"
|
||||
enabled: true
|
||||
state: "stopped"
|
||||
@@ -28,7 +28,7 @@
|
||||
- "venv changed"
|
||||
|
||||
- name: Start services
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: "{{ item.service_name }}"
|
||||
enabled: true
|
||||
state: "started"
|
||||
|
@@ -14,7 +14,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Gather variables for each operating system
|
||||
include_vars: "{{ lookup('first_found', params) }}"
|
||||
ansible.builtin.include_vars: "{{ lookup('first_found', params) }}"
|
||||
vars:
|
||||
params:
|
||||
files:
|
||||
@@ -30,7 +30,7 @@
|
||||
- always
|
||||
|
||||
- name: Including osa.db_setup role
|
||||
include_role:
|
||||
ansible.builtin.include_role:
|
||||
name: openstack.osa.db_setup
|
||||
apply:
|
||||
tags:
|
||||
@@ -52,29 +52,29 @@
|
||||
- always
|
||||
|
||||
- name: Importing skyline_pre_install tasks
|
||||
import_tasks: skyline_pre_install.yml
|
||||
ansible.builtin.import_tasks: skyline_pre_install.yml
|
||||
tags:
|
||||
- skyline-install
|
||||
|
||||
- name: Importing skyline_install tasks
|
||||
import_tasks: skyline_install.yml
|
||||
ansible.builtin.import_tasks: skyline_install.yml
|
||||
tags:
|
||||
- skyline-install
|
||||
|
||||
- name: Importing skyline_post_install tasks
|
||||
import_tasks: skyline_post_install.yml
|
||||
ansible.builtin.import_tasks: skyline_post_install.yml
|
||||
tags:
|
||||
- skyline-config
|
||||
- post-install
|
||||
|
||||
- name: Importing skyline_db_sync tasks
|
||||
import_tasks: skyline_db_sync.yml
|
||||
ansible.builtin.import_tasks: skyline_db_sync.yml
|
||||
when: _skyline_is_first_play_host
|
||||
tags:
|
||||
- skyline-config
|
||||
|
||||
- name: Including openstack.osa.service_setup role
|
||||
include_role:
|
||||
ansible.builtin.include_role:
|
||||
name: openstack.osa.service_setup
|
||||
apply:
|
||||
tags:
|
||||
@@ -99,4 +99,4 @@
|
||||
- always
|
||||
|
||||
- name: Flush handlers
|
||||
meta: flush_handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
@@ -14,7 +14,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Perform a skyline DB sync
|
||||
command: "{{ skyline_bin }}/alembic -c {{ skyline_lib_dir }}/skyline_apiserver/db/alembic/alembic.ini upgrade head"
|
||||
ansible.builtin.command: "{{ skyline_bin }}/alembic -c {{ skyline_lib_dir }}/skyline_apiserver/db/alembic/alembic.ini upgrade head"
|
||||
become: true
|
||||
become_user: "{{ skyline_system_user_name }}"
|
||||
changed_when: false
|
||||
|
@@ -14,7 +14,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Install distro packages
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ skyline_package_list }}"
|
||||
state: "{{ skyline_package_state }}"
|
||||
update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}"
|
||||
@@ -25,14 +25,14 @@
|
||||
delay: 2
|
||||
|
||||
- name: Build skyline-console with yarn
|
||||
include_tasks:
|
||||
ansible.builtin.include_tasks:
|
||||
file: skyline_install_yarn.yml
|
||||
when:
|
||||
- skyline_console_wheel_build_enable | ternary(_skyline_is_first_play_host, True)
|
||||
- skyline_console_yarn_build
|
||||
|
||||
- name: Install the python venv
|
||||
import_role:
|
||||
ansible.builtin.import_role:
|
||||
name: "python_venv_build"
|
||||
vars:
|
||||
venv_python_executable: "{{ skyline_venv_python_executable }}"
|
||||
@@ -52,7 +52,7 @@
|
||||
value: "{{ skyline_venv_tag }}"
|
||||
|
||||
- name: Run the systemd service role
|
||||
include_role:
|
||||
ansible.builtin.include_role:
|
||||
name: systemd_service
|
||||
vars:
|
||||
systemd_user_name: "{{ skyline_system_user_name }}"
|
||||
|
@@ -19,7 +19,7 @@
|
||||
- ansible_facts['os_family'] | lower == 'redhat'
|
||||
block:
|
||||
- name: Download EPEL gpg keys
|
||||
get_url:
|
||||
ansible.builtin.get_url:
|
||||
url: "{{ skyline_yarn_epel_key }}"
|
||||
dest: /etc/pki/rpm-gpg
|
||||
mode: "0640"
|
||||
@@ -29,12 +29,12 @@
|
||||
delay: 2
|
||||
|
||||
- name: Install EPEL gpg keys
|
||||
rpm_key:
|
||||
ansible.builtin.rpm_key:
|
||||
key: "/etc/pki/rpm-gpg/{{ skyline_yarn_epel_key.split('/')[-1] }}"
|
||||
state: present
|
||||
|
||||
- name: Install the EPEL repository
|
||||
yum_repository:
|
||||
ansible.builtin.yum_repository:
|
||||
name: epel-yarn
|
||||
baseurl: "{{ skyline_yarn_epel_mirror ~ '/' ~ ansible_facts['distribution_major_version'] ~ '/Everything/' ~ ansible_facts['architecture'] }}"
|
||||
description: "NodeJS Packages for Enterprise Linux {{ ansible_facts['distribution_major_version'] }} - $basearch"
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
- name: Clone skyline repo to the destination
|
||||
delegate_to: "{{ skyline_console_yarn_setup_host }}"
|
||||
git:
|
||||
ansible.builtin.git:
|
||||
repo: "{{ skyline_console_git_repo }}"
|
||||
version: "{{ skyline_console_git_install_branch }}"
|
||||
dest: "{{ skyline_console_yarn_build_path }}"
|
||||
@@ -64,7 +64,7 @@
|
||||
# due to missing setuptools and pip. If it happens - we consider need
|
||||
# of building yarn
|
||||
- name: Get intended version to be installed
|
||||
command: python3 setup.py --version
|
||||
ansible.builtin.command: python3 setup.py --version
|
||||
args:
|
||||
chdir: "{{ skyline_console_yarn_build_path }}"
|
||||
register: __skyline_console_candidate
|
||||
@@ -74,7 +74,7 @@
|
||||
# NOTE(noonedeadpunk): We check for wheels, as venv might have something different installed
|
||||
# while wheels might be already in place.
|
||||
- name: Check if required wheel is already present
|
||||
uri:
|
||||
ansible.builtin.uri:
|
||||
url: >-
|
||||
{{ openstack_repo_url | default('http://localhost') }}/os-releases/{{ openstack_release | default('master') }}/{{
|
||||
_venv_build_dist_arch }}/wheels/skyline_console-{{ __skyline_console_candidate.stdout_lines[-1] }}-py3-none-any.whl
|
||||
@@ -86,7 +86,7 @@
|
||||
- __skyline_console_candidate is not changed
|
||||
|
||||
- name: Check if installed in the venv version matches
|
||||
command: >-
|
||||
ansible.builtin.command: >-
|
||||
{{ skyline_bin }}/{{ skyline_venv_python_executable }} -c "from importlib.metadata import version; print(version('skyline-console'))"
|
||||
register: __skyline_console_venv
|
||||
changed_when: __skyline_console_venv.rc in [1, 127] or __skyline_console_candidate.stdout_lines[-1] != __skyline_console_venv.stdout_lines[-1]
|
||||
@@ -95,7 +95,7 @@
|
||||
- __skyline_console_candidate is not changed
|
||||
|
||||
- name: Define if we should re-build with yarn
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
skyline_console_yarn_rebuild: true
|
||||
when:
|
||||
- __skyline_console_candidate is changed or __skyline_console_wheels is changed or __skyline_console_venv is changed
|
||||
@@ -105,7 +105,7 @@
|
||||
when: skyline_console_yarn_rebuild
|
||||
block:
|
||||
- name: Install yarn
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ skyline_yarn_packages }}"
|
||||
state: "{{ skyline_package_state }}"
|
||||
register: install_packages
|
||||
@@ -114,7 +114,7 @@
|
||||
delay: 2
|
||||
|
||||
- name: Install yarn requirements (this may take a while)
|
||||
command: "{{ skyline_yarn_binary }} install"
|
||||
ansible.builtin.command: "{{ skyline_yarn_binary }} install"
|
||||
args:
|
||||
chdir: "{{ skyline_console_yarn_build_path }}"
|
||||
register: install_yarn
|
||||
@@ -124,7 +124,7 @@
|
||||
changed_when: false
|
||||
|
||||
- name: Build skyline-console static files (this may take a while)
|
||||
command: "{{ skyline_yarn_binary }} run build"
|
||||
ansible.builtin.command: "{{ skyline_yarn_binary }} run build"
|
||||
args:
|
||||
chdir: "{{ skyline_console_yarn_build_path }}"
|
||||
changed_when: false
|
||||
|
@@ -17,17 +17,17 @@
|
||||
when: skyline_lib_dir is not defined
|
||||
block:
|
||||
- name: Find the venv's python version
|
||||
command: >-
|
||||
ansible.builtin.command: >-
|
||||
{{ skyline_bin }}/{{ skyline_venv_python_executable }} -c 'import skyline_apiserver; print(skyline_apiserver.__file__)'
|
||||
changed_when: false
|
||||
register: _skyline_python_venv_details
|
||||
|
||||
- name: Set python lib dir fact
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
skyline_lib_dir: "{{ _skyline_python_venv_details.stdout | dirname | dirname }}"
|
||||
|
||||
- name: Create gunicorn config
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "gunicorn.py.j2"
|
||||
dest: "/etc/skyline/gunicorn.py"
|
||||
owner: "root"
|
||||
@@ -54,7 +54,7 @@
|
||||
- Restart skyline services
|
||||
|
||||
- name: Get OpenStack endpoints
|
||||
command: >-
|
||||
ansible.builtin.command: >-
|
||||
openstack --os-cloud default endpoint list --format yaml --interface {{ skyline_interface }}
|
||||
delegate_to: "{{ skyline_service_setup_host }}"
|
||||
register: _endpoint_list
|
||||
@@ -62,8 +62,8 @@
|
||||
changed_when: false
|
||||
|
||||
- name: Set endpoint fact
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
openstack_service_endpoints: "{{ _endpoint_list.stdout | from_yaml }}"
|
||||
|
||||
- name: Importing web server configuration tasks
|
||||
import_tasks: skyline_apache.yml
|
||||
ansible.builtin.import_tasks: skyline_apache.yml
|
||||
|
@@ -14,14 +14,14 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Create the system group
|
||||
group:
|
||||
ansible.builtin.group:
|
||||
name: "{{ skyline_system_group_name }}"
|
||||
gid: "{{ skyline_system_group_gid | default(omit) }}"
|
||||
state: "present"
|
||||
system: "yes"
|
||||
|
||||
- name: Create the skyline system user
|
||||
user:
|
||||
ansible.builtin.user:
|
||||
name: "{{ skyline_system_user_name }}"
|
||||
uid: "{{ skyline_system_user_uid | default(omit) }}"
|
||||
group: "{{ skyline_system_group_name }}"
|
||||
@@ -32,7 +32,7 @@
|
||||
home: "{{ skyline_system_user_home }}"
|
||||
|
||||
- name: Create skyline dir
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
owner: "{{ item.owner | default(skyline_system_user_name) }}"
|
||||
|
Reference in New Issue
Block a user