Add mode to packer
Address E208 rule violation Change-Id: I9ab220b0b8cf52ec42d2b4f5097b8bdc9b8f6fc8 Upstream: https://ansible-lint.readthedocs.io/en/latest/default_rules.html#file-permissions-not-mentioned
This commit is contained in:
@@ -8,8 +8,9 @@ skip_list:
|
|||||||
# TODO(AJaeger): E208 gives false positives currently, we
|
# TODO(AJaeger): E208 gives false positives currently, we
|
||||||
# should enable it once all issues in zuul-jobs and
|
# should enable it once all issues in zuul-jobs and
|
||||||
# ansible-lint are fixed.
|
# ansible-lint are fixed.
|
||||||
- '208' # File permissions not mentioned
|
|
||||||
- '301' # Commands should not change things if nothing needs doing
|
- '301' # Commands should not change things if nothing needs doing
|
||||||
|
warn_list:
|
||||||
|
- '208' # File permissions not mentioned
|
||||||
rulesdir:
|
rulesdir:
|
||||||
- ./.rules/
|
- ./.rules/
|
||||||
use_default_rules: true
|
use_default_rules: true
|
||||||
|
|||||||
@@ -29,23 +29,26 @@
|
|||||||
file:
|
file:
|
||||||
path: "{{ packer_install_tempdir.path }}/{{ packer_package }}"
|
path: "{{ packer_install_tempdir.path }}/{{ packer_package }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
mode: 0700
|
||||||
|
|
||||||
- name: Unarchive packer
|
- name: Unarchive packer
|
||||||
unarchive:
|
unarchive:
|
||||||
src: "{{ packer_install_tempdir.path }}/{{ packer_package }}.zip"
|
src: "{{ packer_install_tempdir.path }}/{{ packer_package }}.zip"
|
||||||
dest: "{{ packer_install_tempdir.path }}/{{ packer_package }}"
|
dest: "{{ packer_install_tempdir.path }}/{{ packer_package }}"
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
|
mode: 0600
|
||||||
|
|
||||||
- name: Make sure installation directory exists
|
- name: Make sure installation directory exists
|
||||||
file:
|
file:
|
||||||
path: "{{ packer_install_dir }}"
|
path: "{{ packer_install_dir }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
- name: Install packer
|
- name: Install packer
|
||||||
copy:
|
copy:
|
||||||
src: "{{ packer_install_tempdir.path }}/{{ packer_package }}/packer"
|
src: "{{ packer_install_tempdir.path }}/{{ packer_package }}/packer"
|
||||||
dest: "{{ packer_install_dir }}/packer"
|
dest: "{{ packer_install_dir }}/packer"
|
||||||
mode: '0755'
|
mode: 0755
|
||||||
owner: "{{ ansible_user }}"
|
owner: "{{ ansible_user }}"
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
content: |
|
content: |
|
||||||
{{ packer_variables | to_json }}
|
{{ packer_variables | to_json }}
|
||||||
dest: "{{ packer_variable_tempfile.path }}"
|
dest: "{{ packer_variable_tempfile.path }}"
|
||||||
|
mode: 0600
|
||||||
when: packer_variables is defined
|
when: packer_variables is defined
|
||||||
no_log: true # We don't want to log this since credentials could be passed this way
|
no_log: true # We don't want to log this since credentials could be passed this way
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user