1
0
Fork 0
mirror of https://github.com/ansible-collections/ansible.posix.git synced 2026-02-04 08:01:49 +00:00

Revert "Merge pull request #568 from abakanovskii/feature/add_path_option_authorized_key"

This reverts commit 0821768bcb, reversing
changes made to 5321a9ecb5.
This commit is contained in:
Hideki Saito 2024-10-09 15:33:16 +09:00
parent 3a085b0b10
commit 098b5bee70
No known key found for this signature in database
GPG key ID: 3E1D43AA010AC50A
5 changed files with 1 additions and 62 deletions

View file

@ -35,5 +35,3 @@ multiple_keys_comments: |
ssh-rsa DATA_BASIC 1@testing
# I like adding comments yo-dude-this-is-not-a-key INVALID_DATA 2@testing
ecdsa-sha2-nistp521 ECDSA_DATA 4@testing
key_path: /tmp/id_rsa.pub

View file

@ -1,32 +0,0 @@
---
- name: Create key file for test
ansible.builtin.copy:
dest: "{{ key_path }}"
content: "{{ rsa_key_basic }}"
mode: "0600"
- name: Add key using path
ansible.posix.authorized_key:
user: root
key: file://{{ key_path }}
state: present
path: "{{ output_dir | expanduser }}/authorized_keys"
register: result
- name: Assert that the key was added
ansible.builtin.assert:
that:
- result.changed == true
- name: Add key using path again
ansible.posix.authorized_key:
user: root
key: file://{{ key_path }}
state: present
path: "{{ output_dir | expanduser }}/authorized_keys"
register: result
- name: Assert that no changes were applied
ansible.builtin.assert:
that:
- result.changed == false

View file

@ -31,6 +31,3 @@
- name: Test for the management of comments with key
ansible.builtin.import_tasks: comments.yml
- name: Test for specifying key as a path
ansible.builtin.import_tasks: check_path.yml