Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make edpm_neutron_sriov role compliant with ansible-lint production profile #427

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions roles/edpm_neutron_sriov/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
# License for the specific language governing permissions and limitations
# under the License.

- name: restart neutron-sriov-agent container
- name: Restart neutron-sriov-agent container
become: true
ansible.builtin.systemd:
state: restarted
name: "edpm_neutron_sriov_agent.service"
listen: "restart neutron-sriov-agent"
listen: "Restart neutron-sriov-agent"
10 changes: 5 additions & 5 deletions roles/edpm_neutron_sriov/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@
- configure
- neutron
notify:
- restart neutron-sriov-agent
- Restart neutron-sriov-agent

- name: discover secrets in {{ edpm_neutron_sriov_agent_config_src }}
- name: Discover secrets in {{ edpm_neutron_sriov_agent_config_src }}
ansible.builtin.find:
paths: "{{ edpm_neutron_sriov_agent_config_src }}"
file_type: file
recurse: yes
recurse: true
patterns:
- "*sriov*conf"
- "*sriov*conf"
register: edpm_neutron_sriov_secrets
delegate_to: localhost
become: false

- name: flatten secrets into {{ edpm_neutron_sriov_agent_config_dir }}
- name: Flatten secrets into {{ edpm_neutron_sriov_agent_config_dir }}
ansible.builtin.copy:
src: "{{ item.path }}"
dest: "{{ edpm_neutron_sriov_agent_config_dir }}/{{ item.path | basename }}"
Expand Down
16 changes: 8 additions & 8 deletions roles/edpm_neutron_sriov/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,24 @@
state: directory
mode: "{{ item.mode | default(omit) }}"
loop:
- {'path': "/var/lib/openstack/config/containers", "mode": "0750" }
- {'path': "/var/lib/neutron", "mode": "0750" }
- {'path': "{{ edpm_neutron_sriov_agent_config_dir }}", 'mode': '0755'}
- {'path': "/var/log/containers/stdouts"}
- {'path': "/var/log/containers/neutron"}
- { 'path': "/var/lib/openstack/config/containers", "mode": "0750" }
- { 'path': "/var/lib/neutron", "mode": "0750" }
- { 'path': "{{ edpm_neutron_sriov_agent_config_dir }}", "mode": "0755" }
- { 'path': "/var/log/containers/stdouts" }
- { 'path': "/var/log/containers/neutron" }
tags:
- install
- neutron

- name: render neutron-sriov-agent container
- name: Render neutron-sriov-agent container
become: true
ansible.builtin.template:
src: "neutron_sriov_agent.yaml.j2"
dest: "/var/lib/openstack/config/containers/neutron_sriov_agent.yaml"
setype: "container_file_t"
mode: 0644
mode: "0644"
notify:
- restart neutron-sriov-agent
- Restart neutron-sriov-agent
tags:
- install
- neutron