summaryrefslogtreecommitdiffstats
path: root/test/fixtures
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-26 06:24:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-26 06:24:57 +0000
commit1faea9a6c75f33109e8f66b57b432fdad57b3f46 (patch)
tree4184ce38ac0cf9d5a46bbbae03c87be82927f12b /test/fixtures
parentAdding upstream version 6.17.2. (diff)
downloadansible-lint-1faea9a6c75f33109e8f66b57b432fdad57b3f46.tar.xz
ansible-lint-1faea9a6c75f33109e8f66b57b432fdad57b3f46.zip
Adding upstream version 24.6.1.upstream/24.6.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/fixtures')
-rw-r--r--test/fixtures/broken-ansible.cfg/ansible.cfg2
-rw-r--r--test/fixtures/formatting-after/fmt-2.yml7
-rw-r--r--test/fixtures/formatting-after/fmt-4.yml22
-rw-r--r--test/fixtures/formatting-after/fmt-5.yml25
-rw-r--r--test/fixtures/formatting-after/fmt-hex.yml3
-rw-r--r--test/fixtures/formatting-before/fmt-2.yml7
-rw-r--r--test/fixtures/formatting-before/fmt-4.yml25
-rw-r--r--test/fixtures/formatting-before/fmt-5.yml28
-rw-r--r--test/fixtures/formatting-before/fmt-hex.yml3
-rw-r--r--test/fixtures/formatting-prettier/fmt-2.yml7
-rw-r--r--test/fixtures/formatting-prettier/fmt-4.yml22
-rw-r--r--test/fixtures/formatting-prettier/fmt-5.yml25
-rw-r--r--test/fixtures/formatting-prettier/fmt-hex.yml3
13 files changed, 179 insertions, 0 deletions
diff --git a/test/fixtures/broken-ansible.cfg/ansible.cfg b/test/fixtures/broken-ansible.cfg/ansible.cfg
new file mode 100644
index 0000000..06c1b92
--- /dev/null
+++ b/test/fixtures/broken-ansible.cfg/ansible.cfg
@@ -0,0 +1,2 @@
+[defaults]
+fact_caching_timeout=invalid-value
diff --git a/test/fixtures/formatting-after/fmt-2.yml b/test/fixtures/formatting-after/fmt-2.yml
index a162721..3601acc 100644
--- a/test/fixtures/formatting-after/fmt-2.yml
+++ b/test/fixtures/formatting-after/fmt-2.yml
@@ -22,3 +22,10 @@
- 10
- 9999
zero: 0 # Not an octal. See #2071
+
+- string:
+ - 0steps
+ - 9steps
+ - 0.0.0.0
+ - "0"
+ - "01234"
diff --git a/test/fixtures/formatting-after/fmt-4.yml b/test/fixtures/formatting-after/fmt-4.yml
new file mode 100644
index 0000000..5ded596
--- /dev/null
+++ b/test/fixtures/formatting-after/fmt-4.yml
@@ -0,0 +1,22 @@
+---
+- name: Gather all legacy facts
+ cisco.ios.ios_facts:
+
+- name: Update modification and access time of given file
+ ansible.builtin.file:
+ path: /etc/some_file
+ state: file
+ modification_time: now
+ access_time: now
+
+- name: Disable ufw service
+ ansible.builtin.service:
+ name: ufw
+ enabled: false
+ state: stopped
+ when: '"ufw" in services'
+
+- name: Remove file (delete file)
+ ansible.builtin.file:
+ path: /etc/foo.txt
+ state: absent
diff --git a/test/fixtures/formatting-after/fmt-5.yml b/test/fixtures/formatting-after/fmt-5.yml
new file mode 100644
index 0000000..b259e0e
--- /dev/null
+++ b/test/fixtures/formatting-after/fmt-5.yml
@@ -0,0 +1,25 @@
+---
+- name: Test this playbook
+ hosts: all
+ tasks:
+ - name: Gather all legacy facts
+ cisco.ios.ios_facts:
+
+ - name: Update modification and access time of given file
+ ansible.builtin.file:
+ path: /etc/some_file
+ state: file
+ modification_time: now
+ access_time: now
+
+ - name: Disable ufw service
+ ansible.builtin.service:
+ name: ufw
+ enabled: false
+ state: stopped
+ when: '"ufw" in services'
+
+ - name: Remove file (delete file)
+ ansible.builtin.file:
+ path: /etc/foo.txt
+ state: absent
diff --git a/test/fixtures/formatting-after/fmt-hex.yml b/test/fixtures/formatting-after/fmt-hex.yml
new file mode 100644
index 0000000..7f09cb9
--- /dev/null
+++ b/test/fixtures/formatting-after/fmt-hex.yml
@@ -0,0 +1,3 @@
+---
+d: 0x123 # <-- hex
+e: 0x0123
diff --git a/test/fixtures/formatting-before/fmt-2.yml b/test/fixtures/formatting-before/fmt-2.yml
index 2941663..dbfb777 100644
--- a/test/fixtures/formatting-before/fmt-2.yml
+++ b/test/fixtures/formatting-before/fmt-2.yml
@@ -22,3 +22,10 @@
- 10
- 9999
zero: 0 # Not an octal. See #2071
+
+ - string:
+ - 0steps
+ - 9steps
+ - 0.0.0.0
+ - "0"
+ - "01234"
diff --git a/test/fixtures/formatting-before/fmt-4.yml b/test/fixtures/formatting-before/fmt-4.yml
new file mode 100644
index 0000000..579231f
--- /dev/null
+++ b/test/fixtures/formatting-before/fmt-4.yml
@@ -0,0 +1,25 @@
+---
+- name: Gather all legacy facts
+ cisco.ios.ios_facts:
+
+- name: Update modification and access time of given file
+ ansible.builtin.file:
+ path: /etc/some_file
+ state: file
+ modification_time: now
+ access_time: now
+
+
+- name: Disable ufw service
+ ansible.builtin.service:
+ name: ufw
+ enabled: false
+ state: stopped
+ when: '"ufw" in services'
+
+
+
+- name: Remove file (delete file)
+ ansible.builtin.file:
+ path: /etc/foo.txt
+ state: absent
diff --git a/test/fixtures/formatting-before/fmt-5.yml b/test/fixtures/formatting-before/fmt-5.yml
new file mode 100644
index 0000000..a9145e6
--- /dev/null
+++ b/test/fixtures/formatting-before/fmt-5.yml
@@ -0,0 +1,28 @@
+---
+- name: Test this playbook
+ hosts: all
+ tasks:
+ - name: Gather all legacy facts
+ cisco.ios.ios_facts:
+
+ - name: Update modification and access time of given file
+ ansible.builtin.file:
+ path: /etc/some_file
+ state: file
+ modification_time: now
+ access_time: now
+
+
+ - name: Disable ufw service
+ ansible.builtin.service:
+ name: ufw
+ enabled: false
+ state: stopped
+ when: '"ufw" in services'
+
+
+
+ - name: Remove file (delete file)
+ ansible.builtin.file:
+ path: /etc/foo.txt
+ state: absent
diff --git a/test/fixtures/formatting-before/fmt-hex.yml b/test/fixtures/formatting-before/fmt-hex.yml
new file mode 100644
index 0000000..3bc15a7
--- /dev/null
+++ b/test/fixtures/formatting-before/fmt-hex.yml
@@ -0,0 +1,3 @@
+---
+d: 0x123 # <-- hex
+e: 0x0123
diff --git a/test/fixtures/formatting-prettier/fmt-2.yml b/test/fixtures/formatting-prettier/fmt-2.yml
index 90ac484..037c9dd 100644
--- a/test/fixtures/formatting-prettier/fmt-2.yml
+++ b/test/fixtures/formatting-prettier/fmt-2.yml
@@ -22,3 +22,10 @@
- 10
- 9999
zero: 0 # Not an octal. See #2071
+
+- string:
+ - 0steps
+ - 9steps
+ - 0.0.0.0
+ - "0"
+ - "01234"
diff --git a/test/fixtures/formatting-prettier/fmt-4.yml b/test/fixtures/formatting-prettier/fmt-4.yml
new file mode 100644
index 0000000..5ded596
--- /dev/null
+++ b/test/fixtures/formatting-prettier/fmt-4.yml
@@ -0,0 +1,22 @@
+---
+- name: Gather all legacy facts
+ cisco.ios.ios_facts:
+
+- name: Update modification and access time of given file
+ ansible.builtin.file:
+ path: /etc/some_file
+ state: file
+ modification_time: now
+ access_time: now
+
+- name: Disable ufw service
+ ansible.builtin.service:
+ name: ufw
+ enabled: false
+ state: stopped
+ when: '"ufw" in services'
+
+- name: Remove file (delete file)
+ ansible.builtin.file:
+ path: /etc/foo.txt
+ state: absent
diff --git a/test/fixtures/formatting-prettier/fmt-5.yml b/test/fixtures/formatting-prettier/fmt-5.yml
new file mode 100644
index 0000000..b259e0e
--- /dev/null
+++ b/test/fixtures/formatting-prettier/fmt-5.yml
@@ -0,0 +1,25 @@
+---
+- name: Test this playbook
+ hosts: all
+ tasks:
+ - name: Gather all legacy facts
+ cisco.ios.ios_facts:
+
+ - name: Update modification and access time of given file
+ ansible.builtin.file:
+ path: /etc/some_file
+ state: file
+ modification_time: now
+ access_time: now
+
+ - name: Disable ufw service
+ ansible.builtin.service:
+ name: ufw
+ enabled: false
+ state: stopped
+ when: '"ufw" in services'
+
+ - name: Remove file (delete file)
+ ansible.builtin.file:
+ path: /etc/foo.txt
+ state: absent
diff --git a/test/fixtures/formatting-prettier/fmt-hex.yml b/test/fixtures/formatting-prettier/fmt-hex.yml
new file mode 100644
index 0000000..7f09cb9
--- /dev/null
+++ b/test/fixtures/formatting-prettier/fmt-hex.yml
@@ -0,0 +1,3 @@
+---
+d: 0x123 # <-- hex
+e: 0x0123